Brightness and red/blue control with xsct !

Forum Forums General Tips and Tricks Brightness and red/blue control with xsct !

  • This topic has 6 replies, 3 voices, and was last updated Apr 14-7:04 pm by abc-nix.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #138383
    Member
    PDP-8

      Real quick cli way of controlling your screen brightness AND the blue-light attenuation for nighttime reading with XSCT.

      xsct is in the “enabled repos” in the software center.

      For nighttime, I reduce the color temperature of blue light with this:
      xsct 4500 1.0

      Go back to normal daytime color temperature:
      xsct 6500 1.0

      Want to adjust just your screen brightness?
      xsct 6500 0.8

      You get the picture. I activate xsct either as an executable shell script, or in some DE’s, as a launcher. Pretty convenient. The brightness utility in Base doesn’t detect a driver for me to control, but I took the lazy way out and use xsct. Note that there is also an “sct”, but that package only adjusts temperature.

      #138877
      Member
      RJP

        Great tip! You could make a YAD-script for getting the temperature using a mouse click.

        #139002
        Member
        PDP-8

          Heh, tip: When using the cool antiX version of Software-Installer, and clicking on “Enabled Repos” to get it, notice that the option to “Install Recommended Packages” at the bottom is UN-checked! For a reason. 🙂

          I introduced myself to the absolutely cool “rollback” feature when it all went nuts when I went overboard and blindly clicked on stuff…

          #139119
          Member
          RJP

            Display brightness and color temperature changer with Xgamma and Xsct

            #!/bin/bash
            ##
            # RJP 10.4.2024
            # Manual display´s color temperature changer for sleeping better
            # Packages Yad, Xgamma and Xsct must be installed
            #
            yad --form --columns=1 --width=500 --height=450 --scroll --text="DISPLAY COLOR TEMPERATURE CHANGER:" \
            --field="Night Color":fbtn "bash -c 'xsct 4500 1.0; exec bash' & " \
            --field="Day Color":fbtn "bash -c 'xsct 6500 1.0; exec bash' & " \
            --field="Brightness Xsct 0.6":fbtn "bash -c 'xsct 6500 0.6; exec bash' & " \
            --field="Brightness Xsct 0.8":fbtn "bash -c 'xsct 6500 0.8; exec bash' & " \
            --field="Brightness Xsct 1.0":fbtn "bash -c 'xsct 6500 1.0; exec bash' & " \
            --field="Brightness Xgamma 1.0":fbtn "bash -c 'xgamma -gamma 1.0; exec bash' & " \
            --field="Brightness Xgamma 0.8":fbtn "bash -c 'xgamma -gamma 0.8; exec bash' & " \
            --field="Brightness Xgamma 0.6":fbtn "bash -c 'xgamma -gamma 0.6; exec bash' & " \
            --field="Brightness Xgamma 0.4":fbtn "bash -c 'xgamma -gamma 0.4; exec bash' & " \
            --button=Exit:1
            #139489
            Member
            RJP

              With Xgamma night and day modes.

              #!/bin/bash
              ##
              # RJP 11.4.2024
              # Manual display´s color temperature changer for sleeping better
              # Packages Yad, Xgamma and Xsct must be installed
              # 14.4.2024 Xgamma night and day modes added
              yad --form --columns=1 --width=500 --height=450 --scroll --text="DISPLAY COLOR TEMPERATURE CHANGER:" \
              --field="Night Color":fbtn "bash -c 'xsct 4500 1.0; exec bash' & " \
              --field="Day Color":fbtn "bash -c 'xsct 6500 1.0; exec bash' & " \
              --field="Brightness Xsct 0.6":fbtn "bash -c 'xsct 6500 0.6; exec bash' & " \
              --field="Brightness Xsct 0.8":fbtn "bash -c 'xsct 6500 0.8; exec bash' & " \
              --field="Brightness Xsct 1.0":fbtn "bash -c 'xsct 6500 1.0; exec bash' & " \
              --field="Night Color Xgamma 0.3":fbtn "bash -c 'xgamma -bgamma 0.3; exec bash' & " \
              --field="Day Color Xgamma 1.0":fbtn "bash -c 'xgamma -bgamma 1.0; exec bash' & " \
              --field="Brightness Xgamma 1.0":fbtn "bash -c 'xgamma -bgamma 1.0; exec bash' & " \
              --field="Brightness Xgamma 0.8":fbtn "bash -c 'xgamma -gamma 0.8; exec bash' & " \
              --field="Brightness Xgamma 0.6":fbtn "bash -c 'xgamma -gamma 0.6; exec bash' & " \
              --field="Brightness Xgamma 0.4":fbtn "bash -c 'xgamma -gamma 0.4; exec bash' & " \
              --button=Exit:1
              Attachments:
              #139549
              Member
              PDP-8

                Oh wow, that’s really nice! Thank you for sharing.

                Interesting, with 23.1, when I try to install xgamma, the repo’s can’t find it:

                demo@antix1:~
                $ sudo apt install xgamma
                [sudo] password for demo: 
                Reading package lists... Done
                Building dependency tree... Done
                Reading state information... Done
                Package xgamma is not available, but is referred to by another package.
                This may mean that the package is missing, has been obsoleted, or
                is only available from another source
                However the following packages replace it:
                  x11-xserver-utils:i386 x11-xserver-utils
                E: Package 'xgamma' has no installation candidate
                #139550
                Member
                abc-nix

                  There is no need to install xgamma, as it is already included in antiX by the x11-xserver-utils package.

                  • This reply was modified 1 week, 3 days ago by abc-nix.
                Viewing 7 posts - 1 through 7 (of 7 total)
                • You must be logged in to reply to this topic.