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 OFF=0
ON=2 ON=2
PATH=/sys/devices/platform/dell-laptop/leds/dell::kbd_backlight/brightness KEYBOARD_PATH=/sys/devices/platform/dell-laptop/leds/dell::kbd_backlight/brightness
PREVIOUS_SETTING=$(< $PATH) PREVIOUS_SETTING=$(< $KEYBOARD_PATH)
if [[ $PREVIOUS_SETTING -eq $OFF ]] if [[ $PREVIOUS_SETTING -eq $OFF ]]
then then
echo $ON > $PATH echo $ON > $KEYBOARD_PATH
echo "Keyboard Backlighting: ON" echo "Keyboard Backlighting: ON"
else else
echo $OFF > $PATH echo $OFF > $KEYBOARD_PATH
echo "Keyboard Backlighting: OFF" echo "Keyboard Backlighting: OFF"
fi fi

Loading…
Cancel
Save