reorganize processes on fluxbox startup finally

pull/40/head
TomasM 2017-11-13 15:08:19 -05:00
parent 3cea731b77
commit f0e7e31732
1 changed files with 22 additions and 10 deletions

View File

@ -43,23 +43,35 @@ fi
# which is created by fluxbox at the phase when it sets background.
# Once the file exist, fluxbox-toolbar is already started
SIGNALFILE=~/.fehbg
rm -f $SIGNALFILE
SIGNAL1=~/.fehbg
SIGNAL2=~/.fehbg2
rm -f $SIGNAL1 2>/dev/null
rm -f $SIGNAL2 2>/dev/null
(
while [ ! -e $SIGNALFILE ]; do
while [ ! -e $SIGNAL1 ]; do
sleep 0.1
done
compton --sw-opti -e 0.9 --fade-exclude 'role*="fluxbox-toolbar"' --opacity-rule '70:role*="fluxbox-toolbar"' --no-fading-destroyed-argb -D 5 -c -f -l -2 -t -2 -r 0 -o 1 -z --shadow-exclude 'bounding_shaped' &
touch $SIGNAL2
exec compton --sw-opti -e 0.9 --fade-exclude 'role*="fluxbox-toolbar"' --opacity-rule '70:role*="fluxbox-toolbar"' --no-fading-destroyed-argb -D 5 -c -f -l -2 -t -2 -r 0 -o 1 -z --shadow-exclude 'bounding_shaped'
) &
# We want to run systrayicon only after the volumeicon is started
# So we have to wait until it is visible to xwinfo
# We also wait after background is set and compton is started
(
while [ ! -e $SIGNAL2 ]; do
sleep 0.1
done
rm -f $SIGNAL2
while ! xwininfo -name volumeicon >/dev/null 2>&1 && pgrep volumeicon >/dev/null 2>&1; do
sleep 0.1
done
# volume icon has launched, give it some time to init
sleep 1
# system shutdown/logout icon in system tray
systrayicon --command fblogout --iconfile /usr/share/icons/locolor/16x16/actions/system-shutdown-symbolic.png &
exec systrayicon --command fblogout --iconfile /usr/share/icons/locolor/16x16/actions/system-shutdown-symbolic.png
) &
# In all cases, wait for the sound sleeper.