diff --git a/fish/functions/increase_brightness_by.fish b/fish/functions/increase_brightness_by.fish new file mode 100644 index 0000000..eb7e297 --- /dev/null +++ b/fish/functions/increase_brightness_by.fish @@ -0,0 +1,5 @@ +function increase_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