From ed78850861794f79e7b73b434c85ad9a8a56a1df Mon Sep 17 00:00:00 2001 From: aminnairi <18418459+aminnairi@users.noreply.github.com> Date: Fri, 14 Apr 2023 23:36:58 +0200 Subject: [PATCH] added a function to increase the brightness --- fish/functions/increase_brightness_by.fish | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 fish/functions/increase_brightness_by.fish 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