Re: [wmii] snap: 20060425

From: Alex Elide <elide_AT_bk.ru>
Date: Thu, 27 Apr 2006 17:09:05 +0400

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, Apr 27, 2006 at 05:35:41AM -0700, Tad wrote:
> In addition, here's another feature request: alt-tabbing through views. I
> don't like the clumsy workaround from the Code Snippets section; for one,
> it's not consistent, in that alt-1 won't send me to my "dev" view after
> I've created a view named "abc". C'mon, we have alt+hjkl for moving
> sequentially through clients+columns, why can't we have alt+tab and
> alt+shift+tab for views?
- ---end quoted text---

hm... try to add this in your wmiirc

xw() {
        file="$1"; shift
        echo -n "$@" | wmiir write "$file"
}

function view_tag(){
        xw /ctl view "$1"
}

function next_tag(){
        CT=`wmiir read /view/name`
        PT='nil'
        while read T
        do
                [ "$CT" = "$T" -a $PT != "nil" ] && {
                        echo $PT
                        return;
                }
                PT=$T
        done <<EOF
`wmiir read /tags | sort $1`
EOF
        echo $PT
}

function view_next_tag(){
        view_tag `next_tag`
}
function view_prev_tag(){
        view_tag `next_tag -r`
}

then bind functions view_(next|prev)_tag to any keys you liker,
or even to BarClick event (buttons 3 & 4) to scroll through your tags with mouse.

-----BEGIN PGP SIGNATURE-----

iD8DBQFEUMJxXdMH9oLAFG8RAsElAJ9pn3PCxsHU6XVh85H358Xjl8slGwCgleCO
97LDC4W253wflqISXmuM8KI=
=0Oay
-----END PGP SIGNATURE-----
Received on Thu Apr 27 2006 - 15:08:56 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:03:49 UTC