From: Mark Wooding Date: Mon, 29 Mar 2010 20:16:11 +0000 (+0000) Subject: dot/xinitrc: Wait for e16 to start, and tweak cursor after it does. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/profile/commitdiff_plain/16ee7a8cf7ca905c30344f53f207e3d73b4d5351 dot/xinitrc: Wait for e16 to start, and tweak cursor after it does. This should also stop xterms and the like getting in before E does and ending up in the wrong places as a result. --- diff --git a/dot/xinitrc b/dot/xinitrc index 2ef2a18..f29eddd 100755 --- a/dot/xinitrc +++ b/dot/xinitrc @@ -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 } ###--------------------------------------------------------------------------