Add setkeys script

This commit is contained in:
Rob Watson 2021-04-03 10:45:13 +02:00
parent fc6141c543
commit fb399bc07d
1 changed files with 33 additions and 0 deletions

33
script/setkeys Executable file
View File

@ -0,0 +1,33 @@
#!/usr/bin/env bash
#
# set keymap, e.g. `setkeys us`
#
# Note: show current status with `setkeys -l`
set -e
case "$1" in
"-l")
setxkbmap -print -verbose 10
exit 0
;;
"es")
setxkbmap -model pc104alt -layout es,us -variant nodeadkeys,mac -option compose:rctrl
;;
"us")
setxkbmap -model pc105 -layout us,es -variant mac, -option compose:rctrl
exit 0
;;
"")
echo "argument required"
exit 1
;;
*)
echo "unknown keymap: $1"
exit 2
;;
esac