4 ms·
> But to toggle the keyboard backlight, I have to press Fn-Space bar, because it is hardcoded in the hardware keyboard controller. Whatever. bindsym $mod+Shi
by mattpallissard 3y ago
> But to toggle the keyboard backlight, I have to press Fn-Space bar, because it is hardcoded in the hardware keyboard controller. Whatever.
bindsym $mod+Shift+m exec ~/bin/power_backlight_keyboard.sh
#!/usr/bin/env bash
sys_keyboard_path=/sys/class/leds/tpacpi::kbd_backlight/brightness
if [ -f $sys_keyboard_path ]; then
current=$(<$sys_keyboard_path)
if [ "$current" -eq 0 ]; then
new=1
else
new=0
fi
sudo tee ${sys_keyboard_path} <<< ${new} >/dev/null
fi