Re: [wmii] GIMP tagging problem

From: Chris Foster <foster_AT_physics.uq.edu.au>
Date: Wed, 8 Aug 2007 20:00:37 +1000

On Wed, Aug 08, 2007 at 01:54:37PM +0530, arnuld wrote:
> whenever i start GIMP in wmii, it does not start in current view,
> rather it creates a new view TAGGED with a name "gimp" of it own e.g.
> if i am on view #3 and i start GIMP there then GIMP does not start in
> current view but rather i can see a 4th view automatically created
> and tagged "gimp"

Which version of wmiirc are you using (it shouldn't do this in the
latest snap AFAIK)? The behaviour should be due to something like the
following in your wmiirc file:

wmiir write /tagrules <<!
/Gimp.*/ -> ~
/Gimp.*/ -> gimp
/XMMS.*/ -> ~
/MPlayer.*/ -> ~
/.*/ -> !
/.*/ -> 1
!

Notice the line

/Gimp.*/ -> gimp

which automatically sends gimp windows to the "gimp" tag. If you remove
that line the gimp should start up in the current view.

To get the rules in your current tags file:
$ wmiir read /tagrules

> trouble is i can move between different views using "M-0" or "M-1" (or
> "M-n" where n= TAG number) but i can not move between views tagged -
> 1,2 & gimp

$MODKEY-t will present you with a list of tags via dmenu. Select one
and you'll jump to that tag.

I find that cycling through all possible views is quite helpful - see
the "cycle views" snippet at
http://www.suckless.org/wiki/wmii/tips/code_snippets
if you're using the rc version of wmiirc.

There's other useful stuff on that page as well: eg, binding $MODKEY-0
through $MODKEY-9 to *positions* of tags in the status bar rather than
the names 0-9.

If you're using bash with the gnu tools here's my translation of the
cycle views stuff into bash:

Paste in the following functions:
------------------------------------------------
readTags() {
        wmiir ls /tag | sed 's+/$++; /^sel$/d'
}

nextTag() {
         awk -v "curtag=$(wmiir read /tag/sel/ctl)" \
         'NR==1 {first = $0} $0==curtag { if(getline) print $0; else print first; exit}'
}
------------------------------------------------

Pasting the following into the end of the even processing section will
allow you to move left and right in the list of tags using $MODKEY-< and
$MODKEY->
------------------------------------------------
        Key $MODKEY-period
                wmiir xwrite /ctl "view $(readTags | nextTag)" &
        Key $MODKEY-comma
                wmiir xwrite /ctl "view $(readTags | tac | nextTag)" &
------------------------------------------------

Cheers,
~Chris F.
Received on Wed Aug 08 2007 - 12:00:44 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:26:44 UTC