dot/xinitrc: Wait for e16 to start, and tweak cursor after it does.
[profile] / dot / xinitrc
index f607193..f29eddd 100755 (executable)
@@ -109,8 +109,36 @@ case "$wm,$vnc" in
     ;;
 esac
 
-start-window-manager () {
+start-e16 () {
   run bginit $wm $wmopts
+  win=nil
+  for i in $(seq 10); do
+    if eesh version >/dev/null 2>&1; then
+      win=t
+      break
+    fi
+    sleep 1
+  done
+  case $win in
+    t)
+      info "$wm started ok"
+      run init xsetroot -cursor_name left_ptr
+      ;;
+    nil)
+      info "$wm failed to start!"
+      ;;
+  esac
+}
+
+start-window-manager () {
+  case $(type -t start-$wm || echo "not-found") in
+    function)
+      start-$wm $wmopts
+      ;;
+    *)
+      run bginit $wm $wmopts
+      ;;
+  esac
 }
 
 ###--------------------------------------------------------------------------
@@ -122,6 +150,10 @@ start-clients () {
   ## Mail notification.
   run bginit mail-notification
 
+  ## Policykit authentication agent.
+  agent=/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
+  if [ -x $agent ]; then run bginit $agent; fi
+
   ## System monitor.
   case $vnc in no) run bginit gkrellm ;; esac
 
@@ -137,7 +169,7 @@ start-clients () {
   case $vnc in no) run bginit gnome-panel ;; esac
 
   ## System tray.
-  run bginit stalonetray
+  ## run bginit stalonetray
 
   ## Local clients.
   start-clients-local
@@ -250,7 +282,7 @@ start-xterms () {
 
 req () {
   declare title=$1 hist=$2; shift 2
-  cmd=$(xgetline -t "$title" -p "Command:" -Hl "$HOME/$hist") &&
+  cmd=$(xgetline -t "$title" -p "_Command:" -Hl "$HOME/$hist") &&
   exec "$@" "$cmd"
 }