summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/autostart.sh24
1 files changed, 20 insertions, 4 deletions
diff --git a/bin/autostart.sh b/bin/autostart.sh
index a33b748..95c9f41 100755
--- a/bin/autostart.sh
+++ b/bin/autostart.sh
@@ -3,11 +3,23 @@
readonly NEWS_DIR=/usr/share/parabola-laf/news
readonly NEWS_STAMP=~/.local/share/parabola-laf/last_news
readonly CLEANUP_MSG="These old news files are no longer needed. It is safe to delete them."
-readonly ROOT_WIN_ID=$(xprop -notype -root | awk '$1=="_NET_SUPPORTING_WM_CHECK:"{print $5}')
-readonly WM_NAME=$( xprop -notype -id $ROOT_WIN_ID | awk '$1=="_NET_WM_NAME"{print $3}')
readonly TITLE="_EDITION_TITLE_"
readonly BUTTONS="OK:1,Don't show this again:0"
+
+GetXRootWinId()
+{
+ xprop -notype -root | awk '$1=="_NET_SUPPORTING_WM_CHECK:"{print $5}'
+}
+
+GetWmName()
+{
+ # wait for X root window to be ready
+ n=10 ; while (( n = n - 1 )) && [[ -z "$(GetXRootWinId)" ]] ; do sleep 1 ; done ;
+
+ xprop -notype -id "$(GetXRootWinId)" | awk '$1=="_NET_WM_NAME"{print $3}'
+}
+
DisplayNotice()
{
which gxmessage > /dev/null || return
@@ -55,7 +67,11 @@ do [ -f $notice ] && notice_exists=1 || notice_exists=0
done
# WM-specific startup tasks
-case $WM_NAME in
- '"Openbox"') which octopi-notifier && sleep 10 && octopi-notifier & ;; # FIXME: issue #1850
+case $(GetWmName) in
+ '"Openbox"') which octopi-notifier && octopi-notifier & ;; # FIXME: issue #1850
'"MATE"' ) ;;
esac
+
+
+# FIXME: wbar faux alpha is buggy
+which wbar && killall wbar && cd $HOME && wbar &