From: Samir Benmendil Date: Mon, 2 Mar 2020 00:53:55 +0000 (+0000) Subject: xinit: simplify xinit scripts X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/32f70454b96a7823c2bc681df5d6cfd405c9163a xinit: simplify xinit scripts --- diff --git a/xinit/xprofile b/xinit/xprofile deleted file mode 100644 index c60492e..0000000 --- a/xinit/xprofile +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -start-pulseaudio-x11 - -rc_dir="$XDG_CONFIG_HOME/xinit/xprofile.d" -if [[ -d "$rc_dir" ]] ; then - for f in "$rc_dir"/?*.sh ; do - [ -x "$f" ] && source "$f" - done - unset f -fi -unset rc_dir diff --git a/xinit/xprofile.d/00-pulse.sh b/xinit/xprofile.d/00-pulse.sh new file mode 100755 index 0000000..661a68b --- /dev/null +++ b/xinit/xprofile.d/00-pulse.sh @@ -0,0 +1 @@ +start-pulseaudio-x11 diff --git a/xinitrc b/xinitrc index 268260f..b7597ec 100644 --- a/xinitrc +++ b/xinitrc @@ -4,7 +4,7 @@ logfile=$XDG_DATA_HOME/xorg/xinit.log userresources=$XDG_CONFIG_HOME/xinit/Xresources userresources_d=$XDG_CONFIG_HOME/xinit/Xresources.d usermodmap=$HOME/.Xmodmap -userprofile=$XDG_CONFIG_HOME/xinit/xprofile +userprofile_d=$XDG_CONFIG_HOME/xinit/xprofile.d sysresources=/etc/X11/xinit/.Xresources sysmodmap=/etc/X11/xinit/.Xmodmap @@ -42,6 +42,13 @@ if [ -d /etc/X11/xinit/xinitrc.d ] ; then unset f fi +if [ -d "$userprofile_d" ] ; then + for f in $userprofile_d/?*.sh ; do + [ -f "$f" ] && source "$f" + done + unset f +fi + if [ -f "$userprofile" ]; then source "$userprofile" fi