]> git.donarmstrong.com Git - x_base.git/blobdiff - .xsession
use pactl info instead of pacmd list-sinks for compatibility with pipewire
[x_base.git] / .xsession
index 4fdd2399092d7f9a888903302dddd64b8f56c805..a60ea846bf7bb68c8298d346b44b5e9a9b1323fb 100755 (executable)
--- a/.xsession
+++ b/.xsession
@@ -56,24 +56,34 @@ if [ -e ~/.Xauthority ]; then
     cp -f .Xauthority .Xauthority.bak
 fi
 
-if cmd_exists slock && cmd_exists xautolock; then
-    fork xautolock -notifer true -bell 0 -locker slock;
+if [ -e ~/bin/screensaver ]; then
+    ~/bin/screensaver on;
+elif cmd_exists i3lock && cmd_exists xss-lock; then
+    fork xss-lock -l -- ~/bin/locker
+elif cmd_exists slock && cmd_exists xautolock; then
+    fork xautolock -notifier true -bell 0 -locker slock;
+    if cmd_exists xss-lock; then
+        fork xss-lock -- xautolock -locknow;
+    fi;
 elif cmd_exists xscreensaver && [ -e ~/.xscreensaver ]; then
     fork XENVIRONMENT=~/.xscreensaver /usr/bin/xscreensaver;
 elif cmd_exists xautolock; then
-    fork xautolock -notifer true -bell 0;
+    fork xautolock -notifier true -bell 0;
+    if cmd_exists xss-lock; then
+        fork xss-lock -- xautolock -locknow;
+    fi;
 fi;
 
 if cmd_exists redshift; then
     fork redshift;
 fi;
 
-if cmd_exists mopidy && [ -e ~/.config/mopidy/mopidy.conf ]; then
-    fork mopidy;
-elif cmd_exists mpd && [ -e ~/.mpdconf ]; then
+if cmd_exists mpd && [ -e ~/.mpdconf ]; then
     fork mpd;
     MPD_HOST=$(awk '/^bind_to_address/{print $2}' ~/.mpdconf|sed "s|~|$HOME|; s/^\"//; s/\"$//; ");
     export MPD_HOST;
+elif cmd_exists mopidy && [ -e ~/.config/mopidy/mopidy.conf ]; then
+    fork mopidy;
 fi;
 
 if [ -x /sbin/iw ] && cmd_exists nm-applet && /sbin/iw list|grep -q '^Wiphy'; then