Lots of ways to do this - I’ve used Node-Red before on Raspberry pi’s because I understand the syntax better and it’s more straightforward (to me) how to make the application execute on boot - but based on skill level and experience find the best way - appreciate the code snippets though they are good to have…
Apologies - I took for granted how much research and study it took to find those commands - everyone just looks at those lines like they are magic and doesn’t say thanks - I’ve got a running file on notes on uConsole and another on DevTerm - copied those over - when I get my unit I’ll put those in a directory that is easy to get to so I have control of screen brightness. Thanks again for sharing…
i did my own take on this, but made it in bash
#!/bin/bash
brightness=$(cat /sys/class/backlight/backlight@0/brightness)
maxBrightness=$(cat /sys/class/backlight/backlight@0/max_brightness)
if (( $1 > 0 ))
then
if (($brightness+$1 < $maxBrightness))
then
echo $(($brightness+$1)) > /sys/class/backlight/backlight@0/brightness;
else
echo $maxBrightness > /sys/class/backlight/backlight@0/brightness
fi;
else
if (($brightness > 0))
then
if (($brightness-$2 > 0))
then
echo $(($brightness-$2)) > /sys/class/backlight/backlight@0/brightness;
else
echo 0 > /sys/class/backlight/backlight@0/brightness;
fi;
fi;
fi;
in my i3 config i use this to change my brightness
bindsym XF86MonBrightnessUp exec /home/$USER/scripts/backlight 2 0
bindsym XF86MonBrightnessDown exec /home/$USER/scripts/backlight 0 2
the first argument determines how much to increase brightness by. if its 0 then it will take the second argument as how much to decrease brightness by