X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/918e99b0cfe5655bae0f4fea77838b3f857712e7..5587cf4f528512164052d11e12196416a490e30e:/dot/xinitrc diff --git a/dot/xinitrc b/dot/xinitrc index a0722c5..750bc9e 100755 --- a/dot/xinitrc +++ b/dot/xinitrc @@ -93,9 +93,6 @@ initialize () { ## Key mappings. xmodmap -e 'keysym BackSpace = BackSpace BackSpace' - - ## Gnome settings. - case $vnc in no) run bginit gnome-settings-daemon ;; esac } ###-------------------------------------------------------------------------- @@ -109,8 +106,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 } ###-------------------------------------------------------------------------- @@ -119,25 +144,8 @@ start-window-manager () { start-clients-local () { :; } start-clients () { - ## Mail notification. - run bginit mail-notification - - ## System monitor. - case $vnc in no) run bginit gkrellm ;; esac - - ## Screensaver. - case $vnc in - no) - run init xscreensaver-command -exit - run bginit xscreensaver -no-splash - ;; - esac - - ## Panel. - case $vnc in no) run bginit gnome-panel ;; esac - - ## System tray. - run bginit stalonetray + ## Gnome session. + case $vnc in no) run bginit gnome-session ;; esac ## Local clients. start-clients-local @@ -147,7 +155,7 @@ start-clients () { ### Main screen layout. ## Choose appropriate clients. -emacs=$(pick_program emacs emacs22 emacs21 emacs) +emacs=$(pick_program emacs emacs23 emacs22 emacs21 emacs) term=$(pick_program terminal pterm Eterm xterm) ## Emacs window measurements. @@ -157,7 +165,7 @@ case "$emacs" in e_colchars=82 e_cextra=-2 e_lineht=13 e_vextra=52 ;; - emacs22) + emacs22 | emacs23) e_colwd=492 e_hextra=8 e_colchars=82 e_cextra=-6 e_lineht=13 e_vextra=46 @@ -195,7 +203,8 @@ declare -i \ emacsy="(XHEIGHT - e_vextra)/e_lineht" start-emacs () { - run bgclients noip $emacs -geometry ${emacsx}x${emacsy}+0+0 + GDK_NATIVE_WINDOWS=1 run bgclients noip \ + $emacs -geometry ${emacsx}x${emacsy}+0+0 } ## Now place some xterms. @@ -249,7 +258,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" }