Re: [wmii] Re: Best way to select a particular client?

From: Anselm R. Garbe <>
Date: Tue, 23 May 2006 18:33:44 +0200

On Tue, May 23, 2006 at 11:29:07AM -0400, Jeremy Hankins wrote:
> "Anselm R. Garbe" <> writes:
> > On Tue, May 23, 2006 at 11:00:56AM -0400, Jeremy Hankins wrote:
> >> client active? Ideally, I'd like to go to where I can see that client
> >> and give it focus, as opposed to putting the client where I currently
> >> have focus.
> > I think you miss how tagging works.
> Quite possible, of course, but if so I'm missing how I miss it. ;)
> Currently, I'm not using tags at all, and I'm not clear how that would
> solve my problem. It would complicate it, of course, because if I start
> using tags I'll have to worry about whether the command should select
> some view currently displaying the app, or add it to the current view.
> For now, I'm not worrying about that.
> I tend to rearrange my windows based on task, and I like to hit (for
> example) mod-w and be presented with my web browser. I don't like to
> have to stop and think "now, where did I put my web browser and how do I
> get there from here? Is it already running, or do I need to start it?"
> Mod-w should do all that for me: check to see if it's running, start it
> if necessary, and give it focus.

That's exactly a reason for tagging.
You define the rule to apply www tag to all Firfox windows in

/Firefox.*/ -> www

Thus they always end up in www. Now you can define exactly what
you want with:

        if wmiir read /www 2>/dev/null
                firefox & #firefox not running
                sleep 3
        xwrite /ctl select www;;

That would work for any kind of client.

But I won't treat clients specially in /def/rules, instead I
would customize my tags to be meaningful with words like
{dev,www,irc,mail,pr0n,whatever} and if I want to perform a
specific task, I simply view all apps tagged with such a tag,
e.g. all clients which match the dev tag. And you can apply
those tags dynamically (that's why tagging is quite dynamic).

Hope this gives you some inspirations.

 Anselm R. Garbe  ><><  ><><  GPG key: 0D73F361
Received on Tue May 23 2006 - 18:33:44 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:06:36 UTC