[hackers] [wmii] Fix wmiirc and wmiiloop.

From: Kris Maglione <jg_AT_suckless.org>
Date: Wed Mar 07 20:03:07 2007

changeset: 2008:52d79cd76fa4
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Wed Mar 07 14:01:02 2007 -0500
summary: Fix wmiirc and wmiiloop.

diff -r 994e2bcc192d -r 52d79cd76fa4 rc/wmiirc
--- a/rc/wmiirc Wed Mar 07 10:38:31 2007 -0500
+++ b/rc/wmiirc Wed Mar 07 14:01:02 2007 -0500
@@ -142,9 +142,9 @@ for i in 0 1 2 3 4 5 6 7 8 9; do
 for i in 0 1 2 3 4 5 6 7 8 9; do
         cat << EOF
 Key $MODKEY-$i
- wmiir xwrite /ctl view "\$(echo \$key | sed 's/.*-//')"
+ wmiir xwrite /ctl view "$i"
 Key $MODKEY-Shift-$i
- wmiir xwrite /client/sel/tags "\$(echo \$key | sed 's/.*-//')"
+ wmiir xwrite /client/sel/tags "$i"
 EOF
 done
 } | wmiiloop)
@@ -161,7 +161,7 @@ actionlist() {
 actionlist() {
         {
                 proglist $WMII_CONFPATH
- echo $ACTIONS | tr ' ' '\012'
+ echo -n $Actions | tr ' ' '\012'
         } | sort | uniq
 }
 
@@ -223,5 +223,5 @@ while read event; do
 while read event; do
         set -- $event
         event=$1; shift
- Event_$event $@ 2>/dev/null
+ Event_$event $@ # 2>/dev/null
 done
\ No newline at end of file
diff -r 994e2bcc192d -r 52d79cd76fa4 wmiiloop
--- a/wmiiloop Wed Mar 07 10:38:31 2007 -0500
+++ b/wmiiloop Wed Mar 07 14:01:02 2007 -0500
@@ -6,11 +6,11 @@ BEGIN {
 }
 
 function addevent() {
- if(arg[1] == Key)
- keys[arg[1]] = 1;
+ if(arg[1] == "Key")
+ keys[arg[2]] = 1;
 
         var = arg[1] "s"
- print var "=\"$" var "\n" arg[1] "\""
+ print var "=\"$" var " " arg[2] "\""
 
         gsub("[^a-zA-Z_0-9]", "_", arg[2]);
         print arg[1] "_" arg[2] "() {" body "\n}"
@@ -28,6 +28,6 @@ END {
 END {
         addevent()
         for(key in keys)
- print key | writekeys
+ print key | writekeys;
         close(writekeys);
 }
Received on Wed Mar 07 2007 - 20:03:07 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:56:15 UTC