From a83b1223ef01cff158c7257cfdc7f3caba288b9c Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Sat, 25 Sep 2021 18:55:36 +0200 Subject: xinitrc: sh compatability --- .xinitrc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to '.xinitrc') diff --git a/.xinitrc b/.xinitrc index d9f49ab..935cb33 100644 --- a/.xinitrc +++ b/.xinitrc @@ -12,9 +12,11 @@ if [ -d /etc/X11/xinit/xinitrc.d ]; then fi if [ -f ~/.files ]; then - source ~/.files + . "$HOME/.files" for f in $DOTFILEBASE/xinitrc.d/*; do - [ -x "$f" ] && . "$f" + # Some scripts require bash, but .xinitrc is sourced from sh. + # If a script is marked executable, it is executed instead of sourced. + [ -x "$f" ] && exec "$f" || . "$f" done unset f fi -- cgit v1.2.3