Fix xinitrc issues

Made posix compatible and ensured globbing protection.
This commit is contained in:
Marty Oehme 2020-02-01 15:17:10 +01:00
parent 7ebcce8e82
commit a0a02be852

View file

@ -23,10 +23,9 @@ if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap" xmodmap "$usermodmap"
fi fi
# start some nice programs
if [ -d /etc/X11/xinit/xinitrc.d ]; then if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh; do for f in /etc/X11/xinit/xinitrc.d/?*.sh; do
# shellcheck disable=1090
[ -x "$f" ] && . "$f" [ -x "$f" ] && . "$f"
done done
unset f unset f
@ -37,7 +36,7 @@ fi
setxkbmap -option ctrl:nocaps setxkbmap -option ctrl:nocaps
# sets default to EURkey layout, with possibility to switch to german # 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 # 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 setxkbmap -layout de,eu
else else
setxkbmap -layout eu,de setxkbmap -layout eu,de
@ -74,7 +73,7 @@ type wal >/dev/null 2>&1 && wal -R &
type nextcloud >/dev/null 2>&1 && nextcloud --background & type nextcloud >/dev/null 2>&1 && nextcloud --background &
# additional config options for Touchpad devices ONLY # 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 <TAB> # enable touch tapping for XPS13 touchpad - for different devices get the touchpad name with xinput list-prop <TAB>
xinput set-prop "DLL075B:01 06CB:76AF Touchpad" "libinput Tapping Enabled" 1 xinput set-prop "DLL075B:01 06CB:76AF Touchpad" "libinput Tapping Enabled" 1
fi fi