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

From: Benjamin R. Haskell <suckless_AT_benizi.com>
Date: Sun, 27 Mar 2011 17:42:40 -0400 (EDT)

On Sat, 26 Mar 2011, Marcin Cieslak wrote:

>>> Benjamin R. Haskell wrote:
>> But beyond that, looping or manually launching dwm doesn't solve the
>> problem that all the tag information is lost between restarts. wmii
>> gets around it by dumping the tag information into X props (still
>> loses layout info, but keeping the tags is far better than dumping
>> everything onto a single tag). Has anyone patched dwm to do
>> something similar?
>
> Why don't you start dwm somewhere as "dwm &" in your .xinitrc/whatever
> and use xterm as the "last resort" application to keep the X server
> running?
>
> dwm &
> xterm
>
> I was running for a long time for this - you just kill dwm (from xterm
> or otherwise) and then I do whatever I want from the xterm (launch dwm
> again). I used this mode to hack .h files a lot. The only downside is
> that you have all the windows again on the screen.

Right... which was my original question... :-)

Nonetheless, combining your answer with Anselm's, my .xinitrc now
roughly does:

while true ; do
         _setup_wm_command
         # usually sets cmd=( consolekit-session dbus-session dwm )
         $cmd || urxvt
done

So, it'll repeatedly restart dwm or wmii or whatever. If the wm
crashes, it falls back to just a terminal where I can either fix it or
start an alternate wm.

-- 
Thanks,
Ben
Received on Sun Mar 27 2011 - 23:42:40 CEST

This archive was generated by hypermail 2.2.0 : Sun Mar 27 2011 - 23:48:03 CEST