Re: [dwm] xprop patch

From: Evan Gates <evan.gates_AT_gmail.com>
Date: Tue, 9 Dec 2008 16:26:47 -0500

You can do
while true
do
    dwm || exit
done

This way when you kill dwm correctly (with modkey+shift+q as default)
it respawns, but if you kill it any other way, the Xsession finishes.
You could even add a key binding that does killall dwm or something of
the sort for when you want to end the Xsession.

-Evan

On Tue, Dec 9, 2008 at 3:44 PM, Benoit T <benoit.triquet_AT_gmail.com> wrote:
> On Tue, Dec 09, 2008 at 07:44:21PM +0000, Anselm R Garbe wrote:
>> 2008/12/9 Benoit T <benoit.triquet_AT_gmail.com>:
>> > conversely, when hacking on dwm itself, i like being able to restart dwm
>> > without restarting my x session, yet i want the session to exit when dwm
>> > exits, ie. "dwm & xterm" in .xsession is not what i want.
>>
>> If you consider that Neale's patch makes it upstream, what do you think about:
>>
>> while true
>> do
>> dwm
>> done
>>
>> in .xinitrc to restart dwm?
>
> One of my requirements above was that quitting dwm should quit the X
> session. Here you would have to kill .xsession. This can certainly be
> done by killing dwm's parent in quit() but then the behavior when dwm is
> launched from an xterm would be counter-intuitive!
>
>
> Also, I initially had the requirement of being able to exec dwm at the
> end of .xsession (and have a restart function). But you don't do that
> with dwm reading from stdin, so no way to save one shell process.
>
> With Neale's patch I can finally fulfill that requirement :)
>
> One might point out that we still want one shell process for the status
> script, and that shell could be the one interpreting .xsession and thus
> we do not need exec'ing dwm in the first place.
>
> I know of 2 reasons why we still want a separate process for the status
> script:
> - I can't think of a way to update the status script if it is sourced by
> .xsession rather than forked.
> - the status script might break (after all I am hacking it :) and if
> sourced by .xsession could prevent the entire X session from starting up.
>
>
> Speaking of a separate process, people should probably check the status
> from xsetroot and exit when the X connection closes, to make it more
> robust in case they detach the status script from the parent X process.
>
> cheers
>
> --
> Benoit Triquet <benoit.triquet at gmail.com>
> .''`.
> : :' : We are debian.org. Lower your prices, surrender your code.
> `. `' We will add your hardware and software distinctiveness to
> `- our own. Resistance is futile.
>
>
Received on Tue Dec 09 2008 - 21:26:47 UTC

This archive was generated by hypermail 2.2.0 : Tue Dec 09 2008 - 21:36:03 UTC