Making my laptop screen less bright and reduce eye strain
By Iain Cuthbertson
Running Kubuntu on my 2018 DELL XPS 15 laptop is a joy, when I can reduce the brightness down to its minimum.
During daylight hours, the minimum is bright enough and saves on battery usage.
But during the evening, when I’m tired from staring at monitors all day long, I found that my eyes were begging me to stop using the laptop.
Using the brightness controls on the laptop’s keyboard causes the brightness to step up and down by distinct levels. As one steps down, it goes from the lowest setting to blank.
The step between levels made me feel that there might be the opportunity to have finer grain control, and thus make the screen appear darker before it goes blank.
Searching the ’net finally got me to write the following one liner:
DISPLAY_NAME=$(xrandr -q | grep " connected" | awk '{ print $1 }'); xrandr --output $DISPLAY_NAME --brightness 0.5