Re: [dwm] dwm-5.4 restart without close clients

From: Frederic Chardon <chardon.frederic_AT_gmail.com>
Date: Tue, 13 Jan 2009 18:20:09 +0100

2009/1/13 Luca <luca.postregna_AT_gmail.com>:
> Is there a way to restart dwm after recompiling source without closing
> clients?
> This is my current .xsession
>
> xsetroot -solid black &
> xrandr -s 1024x768 &
>
> uxterm &
> firefox &
>
> while true; do
> xsetroot -name "`date '+%a %Y%m%d %H:%M'`"
> sleep 1
> done &
>
> exec /home/lucapost/usr/bin/dwm > /dev/null
>
> Thanks, Luca.

Someone posted something similar to this on the list a few time ago:

in dwm.c modify quit() to
void
quit(const Arg *arg) {
    if (arg->i)
        execlp("dwm", "dwm", NULL);
    running = False;
}

and an example in config.h:
    { MODKEY|ShiftMask, XK_q, quit, {.i = 1} },
    { MODKEY|ShiftMask|ControlMask, XK_q, quit, {.i = 0} },

It will work whatever app is already launched and whatever is in your
.xinitrc .xsession etc

Regards

Frederic
Received on Tue Jan 13 2009 - 17:20:09 UTC

This archive was generated by hypermail 2.2.0 : Tue Jan 13 2009 - 17:24:04 UTC