On Thu, Mar 16, 2006 at 10:44:29AM +0100, Stefan Tibus wrote:
> On Thu, Mar 16, 2006 at 08:45:14AM +0100, Anselm R. Garbe wrote:
> > 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
> > cleanups):
> > 
> >  $MODKEY-Control-Shift-t)
> >      echo -n `wmiir read /tags | sort | wmiimenu` | wmiir write 
> > /ws/sel/sel/tags &;;
> > 
> >  $MODKEY-Control-t)
> >      echo -n select `wmiir read /tags | sort | wmiimenu` | wmiir write /ctl 
> > &;;
> > 
> > (Though untested)
> 
> Hello Anselm, 
> 
> this works as well as using xwrite (which does just the same). It also 
> resolves the problem of empty tags in /tags and clicking on the labels 
> works now as well. However I wonder why I need the echo -n but can't 
> just do
>       wmiir read /tags | sort | wmiimenu | wmiir write /ws/sel/sel/tags ;;
> to assign new tags. This had been my first approach.

Because wmiimenu prints "selection\n" to stdout that it can be
used in conjunction with read.

> Do you recommend the use of "&"? When using xwrite you don't have it...

Yes, you should use &, because otherwise wmiirc don't proceeds
until you exit wmiimenu, which might be quite some time.

Regards,
-- 
 Anselm R. Garbe  ><><  www.ebrag.de  ><><  GPG key: 0D73F361

_______________________________________________
[email protected] mailing list
http://wmii.de/cgi-bin/mailman/listinfo/wmii

Reply via email to