feat: script to toggle keyboard backlighting

chezmoi
sgoudham 2 years ago
parent b0c3c547dd
commit 75dbb5ed18
Signed by: hammy
GPG Key ID: 44E818FD5457EEA4

@ -2,14 +2,14 @@
OFF=0
ON=2
PATH=/sys/devices/platform/dell-laptop/leds/dell::kbd_backlight/brightness
PREVIOUS_SETTING=$(< $PATH)
KEYBOARD_PATH=/sys/devices/platform/dell-laptop/leds/dell::kbd_backlight/brightness
PREVIOUS_SETTING=$(< $KEYBOARD_PATH)
if [[ $PREVIOUS_SETTING -eq $OFF ]]
then
echo $ON > $PATH
echo $ON > $KEYBOARD_PATH
echo "Keyboard Backlighting: ON"
else
echo $OFF > $PATH
echo $OFF > $KEYBOARD_PATH
echo "Keyboard Backlighting: OFF"
fi

Loading…
Cancel
Save