feat(scripts): make toggle-keyboard-backlights more robust

chezmoi
sgoudham 2 years ago
parent 68904df6c1
commit a6c1e576dd
Signed by: hammy
GPG Key ID: 44E818FD5457EEA4

@ -8,8 +8,16 @@ PREVIOUS_SETTING=$(< $KEYBOARD_PATH)
if [[ $PREVIOUS_SETTING -eq $OFF ]] if [[ $PREVIOUS_SETTING -eq $OFF ]]
then then
echo $ON > $KEYBOARD_PATH echo $ON > $KEYBOARD_PATH
if [[ $? -ne 0 ]]; then
echo "ERROR: Could Not Update Settings"
exit 1
fi
echo "Keyboard Backlighting: ON" echo "Keyboard Backlighting: ON"
else else
echo $OFF > $KEYBOARD_PATH echo $OFF > $KEYBOARD_PATH
if [[ $? -ne 0 ]]; then
echo "ERROR: Could Not Update Settings"
exit 1
fi
echo "Keyboard Backlighting: OFF" echo "Keyboard Backlighting: OFF"
fi fi

Loading…
Cancel
Save