Re: [wmii] Re: Raise a client

From: Paul Malherbe <paul_AT_tartan.co.za>
Date: Mon, 03 Jul 2006 18:46:00 +0200

Paul Malherbe wrote:
> Kris Maglione wrote:
>
>> It would be easier to just patch the source, but this should work also:
>>
>> #!/bin/sh
>> selected=0
>> wmiir read /event 2> /dev/null |
>> while read event
>> do
>> set -- $event
>> if test "$1" = "ClientFocus"
>> if test $selected -eq 0; then
>> for i in `wmiir read /view/0 | awk -e
>> '$10~/^[0-9]+$/{print $10}'`; do
>> if test "`wmiir read /view/0/$i/index`" -eq $2; then
>> selected=1
>> echo select $i | wmiir write /view/0/ctl
>> break
>> fi
>> done
>> else
>> selected=0
>> fi
>> fi
>> done
>>
>>
> Hi Kris
>
> Thanks for your response!!
>
> I have two questions please.
>
> 1) should there be a 'then' at the end of this line?
> test "$1" = "ClientFocus"
>
> 2) what is the -e option for awk. I am using linux so maybe it is different?
>
> Thanks, Paul
>
> _______________________________________________
> wmii_AT_wmii.de mailing list
> http://wmii.de/cgi-bin/mailman/listinfo/wmii
>
>
Hi again Kris

I managed to sort it out, and thanks it does exactly what I wanted.

Regards, Paul
Received on Mon Jul 03 2006 - 18:46:37 UTC

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