dotfiles/.local/bin/scripts/update-keyboard-layout
2021-01-23 19:55:22 +01:00

6 lines
220 B
Bash
Executable file

#!/bin/sh
test "$ACTION" && case $ACTION in
add) id=1;;
remove) id=0;;
esac || id=$(test -c /dev/ttyACM0 && echo 1 || echo 0)
test "$id" && XAUTHORITY="/home/janek/.cache/Xauthority" DISPLAY=:0 xkblayout-state set $id