]> gitweb.fluxo.info Git - rhatto/dotfiles/xsession.git/commitdiff
Feat: adds support for xsessionrc.d
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 3 Jul 2024 20:01:42 +0000 (17:01 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 3 Jul 2024 20:01:42 +0000 (17:01 -0300)
xsessionrc.dot.link

index e5ba39961a1e4fd8d47256a48762b42a2f9e2edd..df2ec030d35ac4c4915a94aa2ee0e11dfa687a0c 100755 (executable)
@@ -84,15 +84,6 @@ export SSH_ASKPASS="/usr/lib/ssh/x11-ssh-askpass"
 #  . $HOME/apps/utils-ssh/ssh-agent-loadkeys
 #fi
 
-# QT configuration
-#
-# Check https://wiki.archlinux.org/title/Uniform_look_for_Qt_and_GTK_applications
-#       https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983536
-#
-# Check also the xnm-tray script at the https://git.fluxo.info/utils-x11
-#export QT_QPA_PLATFORMTHEME="gnome"
-#export XDG_CURRENT_DESKTOP="GNOME"
-
 # Make sure to load the profile
 #
 # Use SETCDPATH workaround as there might be some weird bug
@@ -200,17 +191,30 @@ export AWT_TOOLKIT=MToolkit
 # Next window config (keyringer)
 export XDOTOOL_NEXT_WINDOW="Super_L+Tab"
 
-# Start window manager
+# Start window manager on old systems
 if [ "$OSVERSION" = "7" ] || [ "$START_WINDOW_MANAGER" = "true" ]; then
   $WINDOW_MANAGER
 fi
 
+# Include other xsessionrc files
+if [ -d "$HOME/.xsessionrc.d" ]; then
+  for script in `ls $HOME/.xsessionrc.d`; do
+    . $HOME/.xsessionrc.d/$script
+  done
+fi
+
+# Include custom xsessionrc files
+if [ -d "$HOME/.xsessionrc.d" ]; then
+  # Use run-parts
+  #run-parts $HOME/.custom/xsessionrc.d
+
+  # Just source each file
+  for script in `ls $HOME/.custom/xsessionrc.d`; do
+    . $HOME/.custom/xsessionrc.d/$script
+  done
+fi
+
 # Post processing
 if [ -e "$HOME/.custom/xsession-ready" ]; then
   . $HOME/.custom/xsession-ready
 fi
-
-# Run startup scripts
-#if [ -d "$HOME/.custom/xsessionrc.d" ];
-#  run-parts $HOME/.custom/xsessionrc.d
-#fi