Re: [wmii] snap: 20060313 -- tag bugs?

From: Bartosz Trudnowski <hrr888_AT_gmail.com>
Date: Thu, 16 Mar 2006 18:59:25 +0100

On 3/16/06, Stefan Tibus <sjti_AT_gmx.net> wrote:
>
> On Thu, Mar 16, 2006 at 11:38:04AM +0100, Anselm R. Garbe wrote:
> > > You may as well verify that with hexdump:
> > > $ echo "bla\nblu" | wmiimenu | hexdump
> > > 0000 62 6c 61 bla
> > > $
> >
> > Ah, you're right, didn't noticed that this has been changed,
> > thus you don't need the echo -n in my eyes. wmiimenu does not
> > append '\n'.
>
> Tried that again with wmii-20060316, works now without anything:
> $MODKEY-Control-t)
> echo -n select `wmiir read /tags | sort | wmiimenu` |
> wmiir write /ctl &;;
> $MODKEY-Control-Shift-t)
> wmiir read /tags | sort | wmiimenu | wmiir write
> /ws/sel/sel/tags &;;
> The only drawback (or is it a feature?) of this way of setting tags
> is when you escape from wmiimenu the tag of the selected window
> is set to none and the window is hidden... It would probably be
> a good idea to prepend the clients' current tag to the list of
> all available tags, so it's preselected in wmiimenu.

I resolve this by checking if wmiimenu returns empty string:

tagsmenu() {
        tags=`wmiir read /tags | sort | wmiimenu`
        test -n "$tags" && xwrite $@ "$tags"
}

$MODKEY-Shift-t)
        tagsmenu /ws/sel/sel/tags &;;
$MODKEY-Control-t)
        tagsmenu /ctl select &;;

hrr
Received on Thu Mar 16 2006 - 18:59:30 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:01:18 UTC