On Sun, Mar 27, 2011 at 2:42 PM, Benjamin R. Haskell <suckl...@benizi.com> wrote: > while true ; do > _setup_wm_command > # usually sets cmd=( consolekit-session dbus-session dwm ) > $cmd || urxvt > done
I use a similar approach, but ask the user if the WM termination was intended: xterm -e tail -F ~/.wmii/wmiirc.log & while true; do ck-launch-session wmii xmessage 'Do you really want to quit wmii?' \ -buttons 'Yes:0,No:1' -center \ -default 'No' -timeout 30 \ && break done Also, if an unrecoverable exception occurs in my WM configuration, I launch an xterm to give the user the chance to fix the problem and then I offer to reload the WM configuration for them: https://github.com/sunaku/wmiirc/blob/master/lib/wmiirc/loader.rb#L25 https://github.com/sunaku/wmiirc/blob/master/lib/wmiirc/loader.rb#L99 Cheers.