From a0a02be8526aebd34fd45a8c7437b55289cfd53e Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 1 Feb 2020 15:17:10 +0100 Subject: [PATCH] Fix xinitrc issues Made posix compatible and ensured globbing protection. --- xresources/.config/xresources/xinitrc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/xresources/.config/xresources/xinitrc b/xresources/.config/xresources/xinitrc index 97fbf52..b25940f 100644 --- a/xresources/.config/xresources/xinitrc +++ b/xresources/.config/xresources/xinitrc @@ -23,10 +23,9 @@ if [ -f "$usermodmap" ]; then xmodmap "$usermodmap" fi -# start some nice programs - if [ -d /etc/X11/xinit/xinitrc.d ]; then for f in /etc/X11/xinit/xinitrc.d/?*.sh; do + # shellcheck disable=1090 [ -x "$f" ] && . "$f" done unset f @@ -37,7 +36,7 @@ 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" ] || [ "$HOSTNAME" = "marty-desk" ]; then +if [ "$HOST" = "marty-desk" ]; then setxkbmap -layout de,eu else setxkbmap -layout eu,de @@ -74,7 +73,7 @@ type wal >/dev/null 2>&1 && wal -R & type nextcloud >/dev/null 2>&1 && nextcloud --background & # additional config options for Touchpad devices ONLY -if [ $(dmesg | grep -c "Touchpad") -gt 0 ]; then +if [ "$(dmesg | grep -c "Touchpad")" -gt 0 ]; then # enable touch tapping for XPS13 touchpad - for different devices get the touchpad name with xinput list-prop xinput set-prop "DLL075B:01 06CB:76AF Touchpad" "libinput Tapping Enabled" 1 fi