added a function to decrease the brightness

This commit is contained in:
aminnairi
2023-04-14 23:36:08 +02:00
parent 90fff9cef6
commit 148525c057
@@ -0,0 +1,5 @@
function decrease_brightness_by --argument-names amount
set --local brightness (cat /sys/class/backlight/*/brightness)
set --local brightness_increased (math $brightness - $amount)
echo $brightness_increased | sudo tee /sys/class/backlight/*/brightness > /dev/null
end