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

From: Anselm R. Garbe <>
Date: Thu, 16 Mar 2006 08:45:14 +0100

On Wed, Mar 15, 2006 at 07:07:20PM +0100, Stefan Tibus wrote:
> Hello,
> I really like the new tags, as they allow grouping by name and not
> only numbers, but have some problems with them.
> First of all I need a newline at the end, when writing a tag to
> a clients' tag file. I.e. when using wmiimenu to select and write
> tags I need this:
> $MODKEY-Control-Shift-t)
> extern `wmiir read /tags | sort | awk '\$0 !~ /^\$/' | wmiimenu | awk '{print \$0}' | wmiir write /ws/sel/sel/tags` &;;
> without the second awk (may be replaced by echo $1) it doesn't work,
> the tag is created but not selectable, the client stays hidden...
> With the newline it works, but I get a glyph in the title bar
> right after the tag.
> Maybe related to this I have empty tags appearing in wmiir read /tags,
> that's why I have the first awk in here, to remove those.
> BTW I use this for tag selection:
> $MODKEY-Control-t)
> extern `wmiir read /tags | sort | awk '\$0 !~ /^\$/' | wmiimenu | awk '{print "select " \$0}' | wmiir write /ctl` &;;
> Also, clicking on the tag label in wmiibar to select those clients only
> works for the first one (1) for me. Clicking on others does not do
> anything.

That sounds veru weird. You never should write \n in tag strings
because this is a fs interface and \n are valid characters, thus
writing foo\n will write exactly foo\n to the tags file. That
you get empty entries in /tags might only be related to these
\n's (they insert newlines when fprinting to stdout).

Though \n chars might be treated by the wmiirc event loop.

I'd use following syntax instead (also the extern prefix looks
wrong, because writing to the fs does not need any env

         echo -n `wmiir read /tags | sort | wmiimenu` | wmiir write /ws/sel/sel/tags &;;

         echo -n select `wmiir read /tags | sort | wmiimenu` | wmiir write /ctl &;;

(Though untested)


 Anselm R. Garbe  ><><  ><><  GPG key: 0D73F361
Received on Thu Mar 16 2006 - 08:45:15 UTC

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