]> git.rmz.io Git - dotfiles.git/commitdiff
xprofile: separate xprofile from xinit
authorSamir Benmendil <me@rmz.io>
Mon, 26 Sep 2022 16:11:32 +0000 (17:11 +0100)
committerSamir Benmendil <me@rmz.io>
Wed, 28 Sep 2022 09:57:42 +0000 (10:57 +0100)
When using a display manager xinitrc is not sourced, however xprofile
still is.

Makefile
xinitrc
xprofile [new file with mode: 0644]
xprofile.d/00-pulse.sh [moved from xinit/xprofile.d/00-pulse.sh with 100% similarity]
xprofile.d/00-xrandr.sh [moved from xinit/xprofile.d/00-xrandr.sh with 100% similarity]
xprofile.d/01-redshift.sh [moved from xinit/xprofile.d/01-redshift.sh with 100% similarity]
xprofile.d/10-screensaver.sh [moved from xinit/xprofile.d/10-screensaver.sh with 100% similarity]
xprofile.d/10-xkb.sh [moved from xinit/xprofile.d/10-xkb.sh with 100% similarity]
xprofile.d/99-applications.sh [moved from xinit/xprofile.d/99-applications.sh with 100% similarity]

index d59f59a6d7d5863180d9fe6a5c57aa0ea48297c2..07abd50a8b7c13bbbdf6f1cf30ee2240c01c2f91 100644 (file)
--- 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 3b0bace16819e8631c22468959bfae1317df1ff3..7cb4e1989cb873fa7e904f738b87614fb32b8496 100644 (file)
--- 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 (file)
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