From cfcd4584273e997d7b93306c4fb66c1bcbf6d6cf Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 15 Jun 2020 20:33:37 +0200 Subject: [PATCH] [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. --- X/.config/xresources/xinitrc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/X/.config/xresources/xinitrc b/X/.config/xresources/xinitrc index a2644a9..c209737 100644 --- a/X/.config/xresources/xinitrc +++ b/X/.config/xresources/xinitrc @@ -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