Re: [wmii] Open in new column if only one column.

From: Nathan Neff <nathan.neff_AT_gmail.com>
Date: Thu, 5 Feb 2009 11:16:31 -0600

>> if there is 1 column open, then open a new column when I create a window
>> otherwise, split current column.

> It's not really straightforward. You'd have to script it.
>
> Event CreateClient
> local client=$1
> IFS=+; local tags=$(wmiir read /client/$client/tags); unset
> IFS
> for tag in $tags; do
> if [ $(wmiir read "/tag/$tag/index" | grep '^#' | wc
> -l) = 2 ]; then
> wmiir xwrite "/tag/$tag/ctl" $client right
> fi
> done

Kris, thanks for this script. However, I'm using wmii 3.6 from the
Arch 'extra" repository.

The script doesn't work on my machine. I put "debug" statements in
the CreateClient event, and I get the following:

$client is: Mod4-Return
Tags are:

So, I think that the $tags list isn't being read correctly, because it
doesn't get inside the tags FOR loop.
Therefore, the script never gets inside the IF condition.

Can someone point me in the direction of what kind of data is in the
/client/I can give it a go, but I don't know how the virtual
filesystem is structured.

Thanks,
--Nate
Received on Thu Feb 05 2009 - 17:16:31 UTC

This archive was generated by hypermail 2.2.0 : Thu Feb 05 2009 - 17:24:06 UTC