Reply To: grateful to the creators of this distro; need screen brightness help

Forum › Forums › New users › Welcome to antiX › grateful to the creators of this distro; need screen brightness help › Reply To: grateful to the creators of this distro; need screen brightness help

#186053
PDP-8
Member

    Hi razbone, welcome aboard!

    In the meantime, how about this commandline quickie? I use this technique a lot, and it’s quite fun. We’ll use the xrandr command.

    1) Find out what your active monitor is known as. What we’re looking for are things that are connected such as HDMI-1, DP-2 or whatever:

    xrandr --listactivemonitors

    2) Now that we know, lets set up a command for a default setting where everything for brightness and color is 1. I call it “day” when I make a script out of it (later). My system found that the connected screen is known as HDMI-1. Yours may be different.

    xrandr --output HDMI-1 --brightness 1.0 --gamma 1.0:1.0:1.0

    (BEWARE of the dash! Easy to forget. Ie, some systems might report HDMI-1, whereas on others it has no dash HDMI1. Important if you use antiX portable, and may need to slightly tweak your shell script…)

    3)For tired eyes, or perhaps night-time use, well drop the brightness, and also tweak the color a little bit to match. We don’t want to get psychedelic so there is a formula for the numbers. Be careful with your periods and colons! But for now:

    xrandr --output HDMI-1 --brightness 0.65 --gamma 1.0:0.93:0.81

    You can make small adjustments to brightness, perhaps a bit brighter using 0.7. Or perhaps even a tad less bright by using 0.6. You get the idea. The last two color variables, 0.93 and 0.81 can likewise be tweaked. But leave the first 1.0 variable for gamma as it is.

    Shell script: I don’t want to remember this all the time, so I make a shell script in my user directory. For my “day” script, I use this:

    #!/bin/sh
    xrandr --output HDMI-1 --brightness 1.0 --gamma 1.0:1.0:1.0

    I save this file as “day”. But I want to make it executable!

    chmod +x day

    Now I can run it from the commandline by preceding it with a dot-slash

    ./day

    Do the same thing for the “night” shell script with its differing brightness and color variables.

    The cool thing here is that no matter what system you run, you can give tired eyes a break! 🙂

    • This reply was modified 12 months ago by PDP-8.
    • This reply was modified 12 months ago by PDP-8. Reason: Added dash reminder