X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/59a62625414f72f916e8673674d8cb3b379dfaee..68b2e9e629557d2e5c4ae227fbec038e2839d09c:/dot/xinitrc diff --git a/dot/xinitrc b/dot/xinitrc index 9dc1954..3d337a6 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 + sleep 1 + if eesh version >/dev/null 2>&1; then + win=t + break + fi + 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 } ###-------------------------------------------------------------------------- @@ -118,12 +146,26 @@ start-window-manager () { start-clients-local () { :; } +scsv=$(pick_program screensaver gnome-screensaver xscreensaver) +case $scsv in + xscreensaver) + scsvopts="-no-splash" + ;; + *) + scsvopts="" + ;; +esac + start-clients () { ## Mail notification. run bginit mail-notification + ## Gnome session. With great reluctance. At least it doesn't actually do + ## anything. + run bginit gnome-session + ## Policykit authentication agent. - agent=/usr/lib/policykit-1-gnome/polkit/gnome-authentication-agent-1 + agent=/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 if [ -x $agent ]; then run bginit $agent; fi ## System monitor. @@ -133,16 +175,13 @@ start-clients () { case $vnc in no) run init xscreensaver-command -exit - run bginit xscreensaver -no-splash + run bginit $scsv $scsvopts ;; esac ## Panel. case $vnc in no) run bginit gnome-panel ;; esac - ## System tray. - ## run bginit stalonetray - ## Local clients. start-clients-local } @@ -254,7 +293,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" }