[wmii] Re: Raise a client

From: Jeremy Hankins <nowan_AT_nowan.org>
Date: Sun, 02 Jul 2006 16:17:40 -0400

Paul Malherbe <paul_AT_tartan.co.za> writes:

> I wonder if someone could tell me how to focus and raise a particular
> client above the rest.
> i.e. a 'wmiir write' instruction
>
> This specifically applies to floating clients.
>
> I am trying to write an event script.

The general case of raising a particular client is a bit tricky, but it
can be done. Given a particular client (e.g., /client/n) you have to
first scan /<tag>/<column>/<client>/index for every tag, column, and
client value. Wherever the value in index equals <n> (as in
/client/<n>), that's a potential display path for raising the client --
there can be multiple matches, of course, though only one per view.
Once you decide which option to select, you have to select the column,
the view, and the client. In shell:

echo -n select <n> | wmiir write /<view>/<column>/ctl
echo -n select <column> | wmiir write /<view>/ctl
echo -n view <view> | wmiir write /ctl

I have code to do this in python. It will raise a client with a
matching title or class, cycling matching clients and raising the chosen
client in the current view if it's visible there. Unfortunately once
you scan for matches (spawning wmiir with each read), and select the
view, column, and client, it's quite slow. Even under low load
situations there's a noticeable delay on my machine.

-- 
Jeremy Hankins <nowan_AT_nowan.org>
PGP fingerprint: 748F 4D16 538E 75D6 8333  9E10 D212 B5ED 37D0 0A03
Received on Sun Jul 02 2006 - 22:20:18 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:10:26 UTC