[hackers] [wmii] Fix /rules in wmiirc and p9p/wmiirc. || Kris Maglione

From: <hg_AT_suckless.org>
Date: Thu, 10 Jun 2010 23:50:19 +0000 (UTC)

changeset: 2721:0b89c05b9de6
tag: tip
user: Kris Maglione <kris_AT_suckless.org>
date: Thu Jun 10 19:49:17 2010 -0400
files: alternative_wmiircs/plan9port/wmiirc cmd/wmii/client.c rc/wmiirc.sh
description:
Fix /rules in wmiirc and p9p/wmiirc.

diff -r adbb83b8ace3 -r 0b89c05b9de6 alternative_wmiircs/plan9port/wmiirc
--- a/alternative_wmiircs/plan9port/wmiirc Thu Jun 10 03:23:35 2010 -0400
+++ b/alternative_wmiircs/plan9port/wmiirc Thu Jun 10 19:49:17 2010 -0400
@@ -48,7 +48,7 @@
 # Tagging Rules
 wmiir write /rules <<!
     # MPlayer and VLC don't float by default, but should.
- /MPlayer|VLC/ floating=True
+ /MPlayer|VLC/ floating=on
     # ROX puts all of its windows in the same group, so they open
     # with the same tags. Disable grouping for ROX Filer.
     /^ROX-Filer:/ group=0
diff -r adbb83b8ace3 -r 0b89c05b9de6 cmd/wmii/client.c
--- a/cmd/wmii/client.c Thu Jun 10 03:23:35 2010 -0400
+++ b/cmd/wmii/client.c Thu Jun 10 19:49:17 2010 -0400
@@ -1124,7 +1124,7 @@
                 if(!isspace(tags[n]))
                         break;
 
- if(tags[n] == '+' || tags[n] == '-')
+ if(tags[n] == '+' || tags[n] == '-' || tags[n] == '\0')
                 utflcpy(buf, c->tags, sizeof c->tags);
         else {
                 refree(&c->tagre);
diff -r adbb83b8ace3 -r 0b89c05b9de6 rc/wmiirc.sh
--- a/rc/wmiirc.sh Thu Jun 10 03:23:35 2010 -0400
+++ b/rc/wmiirc.sh Thu Jun 10 19:49:17 2010 -0400
@@ -51,7 +51,7 @@
 # Tagging Rules
 wmiir write /rules <<!
     # MPlayer and VLC don't float by default, but should.
- /MPlayer|VLC/ floating=True
+ /MPlayer|VLC/ floating=on
     # ROX puts all of its windows in the same group, so they open
     # with the same tags. Disable grouping for ROX Filer.
     /^ROX-Filer:/ group=0
@@ -228,10 +228,10 @@
 
 KeyGroup Tag actions
 Key $MODKEY-t # Change to another tag
- (tag=$(wi_tags | wimenu -h "${hist}.tags" -n 50) && wmiir xwrite /ctl view $tag) &
+ wmiir xwrite /ctl view $(wi_tags | wimenu -h "${hist}.tags" -n 50) &
 Key $MODKEY-Shift-t # Retag the selected client
- c=$(wi_selclient)
- (tag=$(wi_tags | wimenu -h "${hist}.tags" -n 50) && wmiir xwrite /client/$c/tags $tag) &
+ # Assumes left-to-right order of evaluation
+ wmiir xwrite /client/$(wi_selclient)/tags $(wi_tags | wimenu -h "${hist}.tags" -n 50) &
 !
         for i in 0 1 2 3 4 5 6 7 8 9; do
                 cat <<!
@@ -261,7 +261,7 @@
 
 # Setup Tag Bar
 IFS="$wi_newline"
-wmiir rm $(wmiir ls /lbar | sed 's,^,/lbar/,') >/dev/null
+wmiir rm $(wmiir ls -p /lbar) >/dev/null
 seltag=$(wmiir read /tag/sel/ctl | sed 1q)
 unset IFS
 wi_tags | while read tag
Received on Thu Jun 10 2010 - 23:50:19 UTC

This archive was generated by hypermail 2.2.0 : Fri Jun 11 2010 - 00:00:21 UTC