[X] Correctly detect laptop or desktop for key map

While shellcheck complains that posix does not know about HOSTNAME
env var, it seems to be required for zsh/bash.
This commit is contained in:
Marty Oehme 2020-06-15 20:33:37 +02:00
parent 90fcf81dfd
commit cfcd458427
No known key found for this signature in database
GPG key ID: 0CCB0526EFB9611A

View file

@ -36,10 +36,11 @@ fi
setxkbmap -option ctrl:nocaps
# sets default to EURkey layout, with possibility to switch to german
# sets german layout to be default for the only pc I have with a german keyboard
if [ "$HOST" = "marty-desk" ]; then
setxkbmap -layout de,eu
else
# shellcheck disable=2039
if [ "$HOST" = "lidell" ] || [ "$HOSTNAME" = "lidell" ]; then
setxkbmap -layout eu,de
else
setxkbmap -layout de,eu
fi
# allows switching layouts with alt+space
setxkbmap -option grp:alt_shift_toggle