skip volume icon waiting if no soundcard is detected

pull/40/head
TomasM 2017-11-13 04:15:54 -05:00
parent 3a15d6b876
commit 5b5f37692a
1 changed files with 4 additions and 2 deletions

View File

@ -63,11 +63,13 @@ rm -f $SIGNALFILE
# We want to run systrayicon only after the volumeicon is started # We want to run systrayicon only after the volumeicon is started
# So we have to wait until it is visible to xwinfo # So we have to wait until it is visible to xwinfo
( (
# volume icon in system tray # volume icon in system tray. Can fail if no soundcard is detected
volumeicon & volumeicon &
while ! xwininfo -name volumeicon >/dev/null 2>/dev/null; do while ! xwininfo -name volumeicon >/dev/null 2>&1 && pgrep volumeicon >/dev/null 2>&1; do
sleep 0.1 sleep 0.1
done done
# volume icon has launched, give it some time to init
sleep 1
# system shutdown/logout icon in system tray # system shutdown/logout icon in system tray
systrayicon --command fblogout --iconfile /usr/share/icons/locolor/16x16/actions/system-shutdown-symbolic.png & systrayicon --command fblogout --iconfile /usr/share/icons/locolor/16x16/actions/system-shutdown-symbolic.png &
) & ) &