dotfiles/script/setkeys

42 lines
724 B
Plaintext
Raw Normal View History

2021-04-03 08:45:13 +00:00
#!/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
;;
2023-12-31 13:05:08 +00:00
"gb")
setxkbmap -model pc105 -layout gb,gb -variant mac, -option compose:rctrl
2024-02-12 20:35:51 +00:00
# keymap mods for Logitech keyboard.
# xmodmap -pke
xmodmap "$(dirname "$0")/../xmodmap-mx-keys-mac"
2023-12-31 13:05:08 +00:00
exit 0
;;
2021-04-03 08:45:13 +00:00
"")
echo "argument required"
exit 1
;;
*)
echo "unknown keymap: $1"
exit 2
;;
esac