[wmii] next/previous view

From: Kai Grossjohann <kai.grossjohann_AT_de.verizonbusiness.com>
Date: Tue, 13 Mar 2007 12:09:33 +0100

I added the following code to rc.wmii to allow me to move backward and
forward in the list of tags (views?). The commands shown here cycle
from the last to the first tag and vice versa.

The keybinding shown here conflicts with the default keybinding
MODKEY-p for executing programs. I use MODKEY-x for that (eXecute).

What do people think? Would it be worth it to include this in the
distro?

Kai

fn Key-$MODKEY-n { wmiir xwrite /ctl view `{next_tag} }
fn Key-$MODKEY-p { wmiir xwrite /ctl view `{prev_tag} }

fn current_tag {
        wmiir read /tag/sel/ctl
}

fn next_tag {
        { read_tags ; read_tags } | /bin/grep -A 1 `{current_tag} | head -n 2 | tail -n +2
}

fn prev_tag {
        { read_tags ; read_tags } | /bin/grep -B 1 `{current_tag} | tail -n 2 | head -n 1
}

Verizon Deutschland GmbH - Sebrathweg 20, 44149 Dortmund, Germany - Amtsgericht Dortmund, HRB 14952 - Geschäftsführer: Donald Badoux - Vorsitzender des Aufsichtsrats: Mark Kearns
Received on Tue Mar 13 2007 - 12:10:29 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:23:35 UTC