7 lines
238 B
Bash
Executable file
7 lines
238 B
Bash
Executable file
#!/bin/sh
|
|
echo $XDG_RUNTIME_DIR
|
|
test "$ACTION" && case $ACTION in
|
|
add) id=1;;
|
|
remove) id=0;;
|
|
esac || id=$(test -c /dev/ttyACM0 && echo 1 || echo 0)
|
|
test "$id" && XAUTHORITY="/run/user/1000/Xauthority" DISPLAY=:0 xkblayout-state set $id
|