Created
December 12, 2023 20:34
-
-
Save jimmygle/4a2206808956d9dded5e024a295edb2d to your computer and use it in GitHub Desktop.
Bash script to toggle keyboard backlight on CMStorm keyboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ls /sys/class/leds | grep scrolllock | while read -r line ; do | |
onoff=`sudo brightnessctl --device="$line" get` | |
if [ $onoff -eq 0 ]; then | |
sudo brightnessctl --device="$line" set 1 | |
else | |
sudo brightnessctl --device="$line" set 0 | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment