aboutsummaryrefslogtreecommitdiff
path: root/.xinitrc
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2021-09-25 18:55:36 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2021-09-25 18:55:36 +0200
commita83b1223ef01cff158c7257cfdc7f3caba288b9c (patch)
treef150dcecc49d3a2b9c9c43ad89ea8b6755e03a58 /.xinitrc
parent99997b71145b53c8f3ede3881ce04d80556d44ec (diff)
downloaddotfiles-a83b1223ef01cff158c7257cfdc7f3caba288b9c.tar.gz
xinitrc: sh compatability
Diffstat (limited to '.xinitrc')
-rw-r--r--.xinitrc6
1 files changed, 4 insertions, 2 deletions
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