Re: [dev] [dwm] tagging interface

From: Ethan Grammatikidis <eekee57_AT_fastmail.fm>
Date: Wed, 6 Oct 2010 21:53:48 +0100

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
> predicate
> part before.
>
> I am skeptical about whether ignoring repeats is worth it.
> All it does is fumble your combo, and that's only if you hold the
> keys for
> more than half a second. Not really a big deal. If it was just a
> matter of
> testing some ev.isrepeat flag (which it should be), I would fix it,
> but it's a matter of a new function and global variable.
> I don't think it's worth it. Maybe I'll do it as an academic
> excercise.

I'd say it's worth it, and I imagine other new dwm users will too,
every now and then. 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 sooner or later, right? They will
repeat, and those repeats will be saved by the server and faithfully
executed by dwm.

If you hold down alt-J you'll end up with a completely arbitrary
window on top, if you hold down shift-alt-C you'll kill everything on
the tag and any other active tags, and if you hold down shift-alt-
return to try to get a terminal to kill it with... Well, a few days
ago I ended up with what I think was over 100 aterms running on my
PDA. :) There were 53 on tag 2 at least. I just killed the X server,
I didn't even look at the tag where the troublesome app was.

As an aside, dwm makes a brilliant window manager for my PDA, I feel
silly for not trying it before. Only 4 tags so as not to crowd the
title bar and monocle mode as the default, and it's just right.

>
> As for general nonblocking peek, a predicate that is always true
> would do it.
>
> I've figured out hg diff now, so I've attached the patch.
> Heres a summary of it:
>
> I found multitagging by toggle to be a bit tedious, so this patch
> changes the
> interface so that if you mash multiple tag keys like a key combo,
> it tags or
> views with those tags. Lifting a key ends the combo. Once you apply
> it,
> replace tag with combotag and view with comboview in config.h.
>
> It used to have trouble if the current tag was in the combo, but
> works now.
> It also didn't used to behave properly with the tagset toggle (MOD-
> Tab).
> It behaves properly now; the new functions (combotag and comboview)
> are
> completely backwards-compatible to the default tag and view
> functions, so you
> can replace all instances with no loss. If you hold the combo too
> long, it will
> fumble it and just select the last tag you hit.
>
> Have fun!<combo.patch>
Received on Wed Oct 06 2010 - 22:53:48 CEST

This archive was generated by hypermail 2.2.0 : Wed Oct 06 2010 - 23:00:04 CEST