This script is meant to bridge the distance between the complicated usage of changing screen brightnesses with xrandr, and monkeys who can't be bothered to remember all of the documentation just to turn their screen down 5 brightness units.
- xrandr
- tput
- bc
- grep
- awk
You can install this file by either downloading it, curling it, or fetching it with wget.
wget
wget https://raw.githubusercontent.com/notmax6677/glow.sh/main/glow.shcurl
curl https://raw.githubusercontent.com/notmax6677/glow.sh/main/glow.sh -o glow.shAfterwards just make it executable
chmod +x glow.shYou can also take out the extension for simplicity
mv PATH_TO_FOLDER/glow.sh PATH_TO_FOLDER/glowThe get function is a very versatile tool, offering up to TWO FUNCTIONS with different capabilities.
The first one, get device, will show all active screen devices attached to your computer.
./glow get deviceor
./glow get devThe second function, being equally useful, is get brightness, it will fetch the brightness of a given screen.
./glow get brightness DEVICE_NAMEor
./glow get br DEVICE_NAMEThe brightness will be shown from a scale of 0 to 1.0. 0 = 0% 1.0 = 100%
The set function seems pretty self-explanatory, it just sets the brightness of a given device.
Use it like this
./glow set DEVICE_NAME BRIGHTNESSPlease remember that BRIGHTNESS is on a scale from 0 to 1.
That's all there is to it, enjoy :)