From 00d390947b9ec98d6adb04deaa42a3cadf645548 Mon Sep 17 00:00:00 2001 From: Debian Live user Date: Sat, 29 Apr 2023 16:29:34 -0400 Subject: xsession: improved firestartx support --- dot/xsession | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/dot/xsession b/dot/xsession index 077702a..c7905fc 100644 --- a/dot/xsession +++ b/dot/xsession @@ -16,7 +16,7 @@ xinput set-prop 'SynPS/2 Synaptics TouchPad' 'libinput Tapping Enabled' 1 if [ -r ~/.Xresources.local ] then - xrdb -merge ~/.Xresources.local + xrdb -merge ~/.Xresources.local fi if [ "${DISPLAY%.*}" = :0 ] @@ -24,8 +24,8 @@ then /usr/lib/notification-daemon/notification-daemon & xterm -e tmux attach & quassel & - firestartx & fi + for wm in xmonad i3 do command -v "$wm" >/dev/null || continue @@ -34,9 +34,26 @@ done if [ -x ~/.xsession.local ] then - ~/.xsession.local + ~/.xsession.local +fi + +if [ "${DISPLAY%.*}" = :0 ] +then + if [ "$XSESSION_DISPLAY0_FIRESTART_RAW" ] + then + if systemctl --user --quiet is-active firefox@$DISPLAY + then + systemctl --user stop firefox@$DISPLAY + fi + firestart & + else + firestartx & + fi +elif [ "$XSESSION_IS_FIRESTARTX" ] +then + firestart & fi -exec perl -e 'wait while 1' +exec perl -MPOSIX -e 'wait while pause' xterm # if exec fails -- cgit v1.2.3