Re: [dev] [dwm] tagging interface

2010-10-08 Thread Wolf Tivy
What should we do for programs which need controls which don't repeat? Make a new kind of input device which looks just like a keyboard but which isn't because keyboard keys repeat, by definition? Obviously some programs do need non-repeats, in which case, by all means, jump thru the

Re: [dev] [dwm] tagging interface

2010-10-08 Thread Wolf Tivy
Yeah, I just wasn't so keen on having to hold down each number when selecting tags, so I tried to alter it so you could do something like so: KeyDown: Modkey KeyPress: 1 KeyPress: 2 KeyUp: Modkey to select 1 | 2, obviously, rather than KeyDown: Modkey KeyDown: 1 KeyDown: 2 KeyUp:

Re: [dev] [dwm] tagging interface

2010-10-07 Thread Rob
On 7 October 2010 01:44, Wolf Tivy wti...@my.bcit.ca wrote: ... Aside, has anyone tried out the combo patch? I am finding it pretty useful. Yeah, I just wasn't so keen on having to hold down each number when selecting tags, so I tried to alter it so you could do something like so: KeyDown:

Re: [dev] [dwm] tagging interface

2010-10-07 Thread Ethan Grammatikidis
On 7 Oct 2010, at 1:44 am, Wolf Tivy wrote: Ok, I'm not sure I understand you on this one. What you are talking about (killing apps) is not affected by my patch. If you mean that we should filter repeats globally in dwm, not just in this case, then I don't think it should be done. That

Re: [dev] [dwm] tagging interface

2010-10-07 Thread matus,
On Thu, Oct 07, 2010 at 05:44:50PM +0100, Ethan Grammatikidis wrote: On 7 Oct 2010, at 1:44 am, Wolf Tivy wrote: Ok, I'm not sure I understand you on this one. What you are talking about (killing apps) is not affected by my patch. If you mean that we should filter repeats globally in dwm,

Re: [dev] [dwm] tagging interface

2010-10-06 Thread Ethan Grammatikidis
On 23 Sep 2010, at 3:28 am, Wolf Tivy wrote: Can you explain what could go wrong? The predicate would be passed in the KeyRelease event (as an XPointer), and return True if it finds a KeyPress with matching time and keycode. Sorry, there is no problem. I didn't quite grasp the arbitrary

Re: [dev] [dwm] tagging interface

2010-10-06 Thread Kurt H Maier
On Wed, Oct 6, 2010 at 4:53 PM, Ethan Grammatikidis eeke...@fastmail.fm wrote: When something running in monocle mode has the X server tied up, whether grabbed or caught up in some buggy behaviour and you're trying to kill the offending app, what do you do? Hold down keys, like everyone does

Re: [dev] [dwm] tagging interface

2010-10-06 Thread Ethan Grammatikidis
On 6 Oct 2010, at 10:01 pm, Kurt H Maier wrote: On Wed, Oct 6, 2010 at 4:53 PM, Ethan Grammatikidis eeke...@fastmail.fm wrote: When something running in monocle mode has the X server tied up, whether grabbed or caught up in some buggy behaviour and you're trying to kill the offending app,

Re: [dev] [dwm] tagging interface

2010-10-06 Thread Wolf Tivy
am finding it pretty useful. - Original Message - From: Ethan Grammatikidis eeke...@fastmail.fm Date: Wednesday, October 6, 2010 1:54 pm Subject: Re: [dev] [dwm] tagging interface To: dev mail list dev@suckless.org On 23 Sep 2010, at 3:28 am, Wolf Tivy wrote: Can you explain what

Re: [dev] [dwm] tagging interface

2010-09-22 Thread yy
2010/9/22 Wolf Tivy wti...@my.bcit.ca: Sorry for being unclear. Not quite like toggle. I mean when you press a tag key it does the normal thing (tags = newtag or whatever), but then if you press more tag keys before you release any of them it adds them to the selection (like tags |= newtag).

Re: [dev] [dwm] tagging interface

2010-09-22 Thread v4hn
On Tue, Sep 21, 2010 at 10:19:55PM -0700, Wolf Tivy wrote: Ok so I'm done my little mods, works great. I have attached a 'patch' so that the rest of you can play with it. Some possible breakage is that the new view function doesn't toggle between the two tag sets. Still works for me though. I

Re: [dev] [dwm] tagging interface

2010-09-22 Thread Wolf Tivy
hey, sounds quite interesting, but what's wrong with a simple diff-file instead of instructions where to insert c-code? -.- v4hn A diff would be better, but my dwm has some other crap, and I don't have the unmodified, and those are just excuses for the fact that i don't know how to make

Re: [dev] [dwm] tagging interface

2010-09-22 Thread Wolf Tivy
By the previous tags I mean the other tagset. It can be toggled with view(0), MODKEY+Tab by default. If you want to add that functionality to your patch add     selmon-seltags ^= 1; /* toggle sel tagset */ before     selmon-tagset[selmon-seltags] = newtags; It will probably be

Re: [dev] [dwm] tagging interface

2010-09-22 Thread Robert Ransom
On Wed, 22 Sep 2010 10:42:43 -0700 Wolf Tivy wti...@my.bcit.ca wrote: hey, sounds quite interesting, but what's wrong with a simple diff-file instead of instructions where to insert c-code? -.- v4hn A diff would be better, but my dwm has some other crap, and I don't have the

Re: [dev] [dwm] tagging interface

2010-09-22 Thread matus,
20, 2010 9:44 pm Subject: [dev] [dwm] tagging interface To: dev@suckless.org I would like to change the way tag selection works in my dwm. The way I think it should work is if you press two (or more) tag select keysbefore you release one of them, dwm would select both tags. Likewise

Re: [dev] [dwm] tagging interface

2010-09-22 Thread Wolf Tivy
I suppose your goal was code economy, so maybe you don't care, but: by not adding the code to deal with repeats, you're forcing the resulting release/press pairs to be handled by the toplevel event loop, one undoing the effect of the other. Visually though it shouldn't be an issue: like

Re: [dev] [dwm] tagging interface

2010-09-22 Thread matus,
On Wed, Sep 22, 2010 at 03:00:53PM -0700, Wolf Tivy wrote: I wasn't just being cheap when I left that out. It looks like XPeekEvent blocks, which won't do. I haven't found the (hopefully existent) non-blocking equivalent, so I can't even write that part. Okay, I feel like a moron: I had no

Re: [dev] [dwm] tagging interface

2010-09-22 Thread Connor Lane Smith
Hey, On Wednesday, 22 September 2010, Wolf Tivy wti...@my.bcit.ca wrote: I wasn't just being cheap when I left that out. It looks like XPeekEvent blocks, which won't do. I haven't found the (hopefully existent) non-blocking equivalent, so I can't even write that part. There are various

Re: [dev] [dwm] tagging interface

2010-09-22 Thread matus,
On Wed, Sep 22, 2010 at 11:44:46PM +0100, Connor Lane Smith wrote: Hey, On Wednesday, 22 September 2010, Wolf Tivy wti...@my.bcit.ca wrote: I wasn't just being cheap when I left that out. It looks like XPeekEvent blocks, which won't do. I haven't found the (hopefully existent)

Re: [dev] [dwm] tagging interface

2010-09-22 Thread yy
2010/9/23 Wolf Tivy wti...@my.bcit.ca: If someone can elaborate on the motivation and use-cases for the toggle, I might be better able to give it the right semantics with the combo stuff. From my understanding it's no longer necessary as it was simply a mechanism to cache your tagset which was

Re: [dev] [dwm] tagging interface

2010-09-22 Thread Wolf Tivy
There are various functions I think you could use. apropos XCheck? In particular, XCheckIfEvent seems well suited to this situation- -feed in a predicate which specifically finds the repeated KeyPress (matches time, key, etc.). But this can perform unnecessary computation since it

Re: [dev] [dwm] tagging interface

2010-09-22 Thread matus,
On Wed, Sep 22, 2010 at 05:41:24PM -0700, Wolf Tivy wrote: In particular, XCheckIfEvent seems well suited to this situation- -feed in a predicate which specifically finds the repeated KeyPress (matches time, key, etc.). But this can perform unnecessary computation since it checks things

Re: [dev] [dwm] tagging interface

2010-09-21 Thread Wolf Tivy
You want the KeyRelease event. Note that, by default, X11 will generate spurious repeat KeyPress events. Years ago I read the relevant SDL code (which maintains a vector of which keys are currently down) to see if it had a nice way of handling these events. It turns out it just had

Re: [dev] [dwm] tagging interface

2010-09-21 Thread yy
2010/9/21 Wolf Tivy wti...@my.bcit.ca: I would like to change the way tag selection works in my dwm. The way I think it should work is if you press two (or more) tag select keysbefore you release one of them, dwm would select both tags. Likewise for tagging windows. I think this would make the

Re: [dev] [dwm] tagging interface

2010-09-21 Thread matus,
On Tue, Sep 21, 2010 at 07:07:30PM +, Wolf Tivy wrote: That would suck. Good to know it can be done tho. I have heard of a way to turn off repeats, and I'll look into that before I do any nasty race-condition hacks. The only mechanism I know of is what xset r off does, i.e. it is not a

Re: [dev] [dwm] tagging interface

2010-09-21 Thread Wolf Tivy
I'm not sure I'm understanding what you mean but I think you can achieve that only changing your config: #define TAGKEYS(KEY,TAG) \ { MODKEY,   KEY,  toggleview,   {.ui = 1 TAG} }, \ (n.b. toggleview instead of view) You don't need to release modkey

Re: [dev] [dwm] tagging interface (X event stuff)

2010-09-21 Thread Wolf Tivy
As you can see, I misspoke earlier: the events have *exactly* the same time field.  Combining this with what I said about the queuing (the atomic insertion), I think you'll agree that doing XPeekEvent inside the KeyRelease handler, and discarding the pair of events if the time, keycode,

Re: [dev] [dwm] tagging interface

2010-09-21 Thread Wolf Tivy
toggle functions. Thanks for all the help! - Original Message - From: Wolf Tivy wti...@my.bcit.ca Date: Monday, September 20, 2010 9:44 pm Subject: [dev] [dwm] tagging interface To: dev@suckless.org I would like to change the way tag selection works in my dwm. The way I think it should work

[dev] [dwm] tagging interface

2010-09-20 Thread Wolf Tivy
I would like to change the way tag selection works in my dwm. The way I think it should work is if you press two (or more) tag select keysbefore you release one of them, dwm would select both tags. Likewise for tagging windows. I think this would make the tagging stuff much more usable and

Re: [dev] [dwm] tagging interface

2010-09-20 Thread matus,
On Mon, Sep 20, 2010 at 08:44:18PM -0700, Wolf Tivy wrote: [..] So does anyone know how to change the mode or something so that we can get the paired events instead of just 'keypress'? I know this is possible somewhere because that's how SDL does it. You want the KeyRelease event. Note