Re: [dwm] Preventing xterm from closing by killclient()

2008-04-12 Thread Martin Sander
On Sat, Apr 12, 2008 at 11:43:52AM +0200, Anselm R. Garbe wrote: > Yea, I propose to call it isimmortal. You're the boss.. I also added a test for arg in killclient, so that I can have an extra keybinding to killclient("somestring") to kill immortals. That takes care of the aforementioned cornerc

Re: [dwm] Preventing xterm from closing by killclient()

2008-04-12 Thread Anselm R. Garbe
On Fri, Apr 11, 2008 at 07:15:15PM +0200, Martin Sander wrote: > On Fri, Apr 11, 2008 at 06:32:54PM +0200, Valentin wrote: > > > Just extend struct Client with Bool iskillable and set this > > > value at the same point as isfloating is set in applyrules, then > > > you just need to check c->iskilla

Re: [dwm] Preventing xterm from closing by killclient()

2008-04-11 Thread Martin Sander
On Fri, Apr 11, 2008 at 06:32:54PM +0200, Valentin wrote: > > Just extend struct Client with Bool iskillable and set this > > value at the same point as isfloating is set in applyrules, then > > you just need to check c->iskillable in killclient(). > If I do that, iskillable is set to False by defa

Re: [dwm] Preventing xterm from closing by killclient()

2008-04-11 Thread Valentin
On Fri, 11 Apr 2008 12:26:04 +0200 "Anselm R. Garbe" <[EMAIL PROTECTED]> wrote: > Just extend struct Client with Bool iskillable and set this > value at the same point as isfloating is set in applyrules, then > you just need to check c->iskillable in killclient(). If I do that, iskillable is set t

Re: [dwm] Preventing xterm from closing by killclient()

2008-04-11 Thread Anselm R. Garbe
On Fri, Apr 11, 2008 at 04:57:29PM +0200, Martin Sander wrote: > On Fri, Apr 11, 2008 at 12:26:04PM +0200, Anselm R. Garbe wrote: > > Though, I would propose to set c->iskillable to True during > > killclient() to allow getting rid of unresponsive clients which > > cannot be killed straight away. >

Re: [dwm] Preventing xterm from closing by killclient()

2008-04-11 Thread Martin Sander
On Fri, Apr 11, 2008 at 12:26:04PM +0200, Anselm R. Garbe wrote: > Just extend struct Client with Bool iskillable and set this > value at the same point as isfloating is set in applyrules, then > you just need to check c->iskillable in killclient(). Thanks for the hint, that is a lot better. > Th

Re: [dwm] Preventing xterm from closing by killclient()

2008-04-11 Thread Anselm R. Garbe
On Fri, Apr 11, 2008 at 06:29:14AM +0200, Martin Sander wrote: > On Wed, Apr 09, 2008 at 07:17:06PM -0400, Jeremy O'Brien wrote: > > I recommend looking in applyrules() for some example code. You may be able > > to adapt it in killclient() :) > > I had thought of that before, but I was still usin

Re: [dwm] Preventing xterm from closing by killclient()

2008-04-10 Thread Martin Sander
On Wed, Apr 09, 2008 at 07:17:06PM -0400, Jeremy O'Brien wrote: > I recommend looking in applyrules() for some example code. You may be able > to adapt it in killclient() :) I had thought of that before, but I was still using 4.7 with regex matching and that looked complicated to me. Anyway, it w

Re: [dwm] Preventing xterm from closing by killclient()

2008-04-09 Thread Jacek Hoffman
You can use close() command in the ipython window in order to close the plot window instead of killclient On Thu, 10 Apr 2008, Martin Sander wrote: > On Wed, Apr 09, 2008 at 11:25:59PM +0200, Anselm R. Garbe wrote: > > Hmm, what about changing the binding to Ctrl-d in your setup > > then? >

Re: [dwm] Preventing xterm from closing by killclient()

2008-04-09 Thread Jeremy O'Brien
I recommend looking in applyrules() for some example code. You may be able to adapt it in killclient() :) On Apr 9, 2008, at 18:56, Martin Sander <[EMAIL PROTECTED]> wrote: On Wed, Apr 09, 2008 at 11:25:59PM +0200, Anselm R. Garbe wrote: Hmm, what about changing the binding to Ctrl-d in your

Re: [dwm] Preventing xterm from closing by killclient()

2008-04-09 Thread Martin Sander
On Wed, Apr 09, 2008 at 11:25:59PM +0200, Anselm R. Garbe wrote: > Hmm, what about changing the binding to Ctrl-d in your setup > then? Thanks for the suggestion, but I think I did not make myself entirely clear. My problem is of different nature. As an example, I have an xterm with an ipython [2

Re: [dwm] Preventing xterm from closing by killclient()

2008-04-09 Thread Anselm R. Garbe
On Wed, Apr 09, 2008 at 04:03:44PM +0200, Martin Sander wrote: > In the last time I repeatedly closed xterm windows on accident by my > killclient binding (MODKEY|ShiftMask, XK_c) because I did not see that > the xterm had focus and not that stupid other client that does not > provide a convenient

[dwm] Preventing xterm from closing by killclient()

2008-04-09 Thread Martin Sander
Hey. In the last time I repeatedly closed xterm windows on accident by my killclient binding (MODKEY|ShiftMask, XK_c) because I did not see that the xterm had focus and not that stupid other client that does not provide a convenient keyboard shortcut of its own to close. I always close xterms with