From: Samir Benmendil Date: Mon, 26 Sep 2022 16:11:32 +0000 (+0100) Subject: xprofile: separate xprofile from xinit X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/367a240534f2e939fbb15baed6a34736b7360637?ds=inline xprofile: separate xprofile from xinit When using a display manager xinitrc is not sourced, however xprofile still is. --- diff --git a/Makefile b/Makefile index d59f59a..07abd50 100644 --- a/Makefile +++ b/Makefile @@ -144,11 +144,16 @@ yay: $(XDG_CONFIG_HOME) ln -sfT $(APATH)/yay $(XDG_CONFIG_HOME)/yay mkdir -p $(XDG_CACHE_HOME)/yay -xinit: $(XDG_CONFIG_HOME) +xinit: $(XDG_CONFIG_HOME) xprofile ln -sfT $(APATH)/$@rc ~/.$@rc ln -sfT $(APATH)/$@ $(XDG_CONFIG_HOME)/$@ .PHONY: xinit +xprofile: $(XDG_CONFIG_HOME) + ln -sfT $(APATH)/$@ ~/.$@ + ln -sfT $(APATH)/$@.d $(XDG_CONFIG_HOME)/$@.d +.PHONY: xprofile + wakeonlan: $(XDG_CONFIG_HOME) ln -sfT $(APATH)/$@ $(XDG_CONFIG_HOME)/$@ .PHONY: wakeonlan diff --git a/xinitrc b/xinitrc index 3b0bace..7cb4e19 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_d=$XDG_CONFIG_HOME/xinit/xprofile.d +userprofile=$HOME/.xprofile sysresources=/etc/X11/xinit/.Xresources sysmodmap=/etc/X11/xinit/.Xmodmap @@ -50,13 +50,6 @@ 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 diff --git a/xprofile b/xprofile new file mode 100644 index 0000000..97580b9 --- /dev/null +++ b/xprofile @@ -0,0 +1,10 @@ +#!/bin/sh + +userprofile_d=$XDG_CONFIG_HOME/xprofile.d + +if [ -d "$userprofile_d" ] ; then + for f in $userprofile_d/?*.sh ; do + [ -f "$f" ] && source "$f" + done + unset f +fi diff --git a/xinit/xprofile.d/00-pulse.sh b/xprofile.d/00-pulse.sh similarity index 100% rename from xinit/xprofile.d/00-pulse.sh rename to xprofile.d/00-pulse.sh diff --git a/xinit/xprofile.d/00-xrandr.sh b/xprofile.d/00-xrandr.sh similarity index 100% rename from xinit/xprofile.d/00-xrandr.sh rename to xprofile.d/00-xrandr.sh diff --git a/xinit/xprofile.d/01-redshift.sh b/xprofile.d/01-redshift.sh similarity index 100% rename from xinit/xprofile.d/01-redshift.sh rename to xprofile.d/01-redshift.sh diff --git a/xinit/xprofile.d/10-screensaver.sh b/xprofile.d/10-screensaver.sh similarity index 100% rename from xinit/xprofile.d/10-screensaver.sh rename to xprofile.d/10-screensaver.sh diff --git a/xinit/xprofile.d/10-xkb.sh b/xprofile.d/10-xkb.sh similarity index 100% rename from xinit/xprofile.d/10-xkb.sh rename to xprofile.d/10-xkb.sh diff --git a/xinit/xprofile.d/99-applications.sh b/xprofile.d/99-applications.sh similarity index 100% rename from xinit/xprofile.d/99-applications.sh rename to xprofile.d/99-applications.sh