Re: [wmii] Re: Raise a client

From: Paul Malherbe <>
Date: Sun, 02 Jul 2006 23:50:17 +0200

Jeremy Hankins wrote:
> Paul Malherbe <> 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.
Hi Jeremy

Thanks for you input, it has really helped me!!

What I was trying to do was write an event script which would raise the
client which received focus.

I have done it but the response is slow (acceptable), however I have had
to write a bash script calling a python script as my bash is not very good.
Could you maybe help me simplify it by using only one (python) script?

I have attached the two scripts.

Thanks, Paul

wmiir read /event 2> /dev/null |
while read event
        set -- $event
        if test "$1" = "ClientFocus"
        then /home/paul/.wmii-3/

Received on Sun Jul 02 2006 - 23:50:54 UTC

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