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

From: Kris Maglione <maglione.k_AT_gmail.com>
Date: Thu, 5 Feb 2009 12:51:24 -0500

On Thu, Feb 05, 2009 at 11:16:31AM -0600, Nathan Neff wrote:
>Kris, thanks for this script. However, I'm using wmii 3.6 from the
>Arch 'extra" repository.

Ugh, please use wmii-hg from AUR. I'm probably going to release
3.7 soon.

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

Don't bother with debug statements, just wrap the whole block
with:

set -x
...
set +x

>$client is: Mod4-Return
>Tags are:

Ok, $client should obviously *not* be Mod4-Return, that's your
last key press. I'm not sure what's wrong there. At any rate, I
think I posted that code with the usual caveat that it's not
tested. Someone sent me a fix, off-list, a week or so ago:

From: Thomas Platzer <t.platzer_AT_gmx.at>
To: maglione.k_AT_gmail.com
Subject: your post on wmii list
Date: Fri, 30 Jan 2009 20:57:34 +0100
User-Agent: KMail/1.10.3 (Linux/2.6.27-11-generic; KDE/4.1.3; i686; ; )

Hi Kris.

On 21th December you posted a little snippet on the wmii list in response to
>if there is 1 column open, then open a new column when I create
>a window otherwise, split current column.

         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

Well, it doesn't seem to work. After much fiddling it seems to
work when you correct the write line as follows:

                              wmiir xwrite "/tag/$tag/ctl" send sel right

I'm nowhere near proficient in wmii but thought you might want to know.

-- 
Kris Maglione
If the programmer can simulate a construct faster than a compiler can
implement the construct itself, then the compiler writer has blown it
badly.
	--Guy Steele
Received on Thu Feb 05 2009 - 17:51:24 UTC

This archive was generated by hypermail 2.2.0 : Thu Feb 05 2009 - 18:00:08 UTC