aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2024-11-20 18:30:01 +0100
committerFlorian Fischer <florian.fischer@muhq.space>2024-11-20 18:30:01 +0100
commit25f8e2186fa992f0298fb87f95c0105b83938c4c (patch)
tree9777778ee2651071d227f9a2aedbe4c980d88ef3 /scripts
parentacc8595df96408eb21fae484579b392b8a88cce1 (diff)
downloaddotfiles-25f8e2186fa992f0298fb87f95c0105b83938c4c.tar.gz
dotfiles-25f8e2186fa992f0298fb87f95c0105b83938c4c.zip
add script to toggle the keyboard backlight
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/toggle_keyboard_light.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/toggle_keyboard_light.sh b/scripts/toggle_keyboard_light.sh
new file mode 100755
index 0000000..6497fcf
--- /dev/null
+++ b/scripts/toggle_keyboard_light.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+light_dev=sysfs/leds/white:kbd_backlight
+
+if [ "$(light -s $light_dev)" = "100.00" ]; then
+ light -s $light_dev -S 0
+else
+ light -s $light_dev -S 100
+fi