Re: [dev] Re: [dwm] "reload" configuration?

From: Suraj Kurapati <sunaku_AT_gmail.com>
Date: Sun, 27 Mar 2011 17:17:54 -0700

On Sun, Mar 27, 2011 at 2:42 PM, Benjamin R. Haskell
<suckless_AT_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.
Received on Mon Mar 28 2011 - 02:17:54 CEST

This archive was generated by hypermail 2.2.0 : Mon Mar 28 2011 - 02:24:03 CEST