[hackers] [wmii] Fix selection of views by index.

From: Kris Maglione <jg_AT_suckless.org>
Date: Tue Feb 27 07:58:44 2007

changeset: 1969:101e7939736d
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Tue Feb 27 01:57:01 2007 -0500
summary: Fix selection of views by index.

diff -r 1f00053b6722 -r 101e7939736d 9menu.c
--- a/9menu.c Mon Feb 26 16:04:04 2007 -0500
+++ b/9menu.c Tue Feb 27 01:57:01 2007 -0500
@@ -130,15 +130,15 @@ args(int argc, char **argv)
                 } else if (strcmp(argv[i], "-font") == 0) {
                         fontname = argv[i+1];
                         i++;
- } else if (strcmp(argv[i], "-nb") == 0)
+ } else if (strncmp(argv[i], "-nb", 3) == 0)
                         nbgname = argv[i][3] ? &argv[i][3] : argv[++i];
- else if (strcmp(argv[i], "-nf") == 0)
+ else if (strncmp(argv[i], "-nf", 3) == 0)
                         nfgname = argv[i][3] ? &argv[i][3] : argv[++i];
- else if (strcmp(argv[i], "-sb") == 0)
+ else if (strncmp(argv[i], "-sb", 3) == 0)
                         sbgname = argv[i][3] ? &argv[i][3] : argv[++i];
- else if (strcmp(argv[i], "-sf") == 0)
+ else if (strncmp(argv[i], "-sf", 3) == 0)
                         sfgname = argv[i][3] ? &argv[i][3] : argv[++i];
- else if (strcmp(argv[i], "-br") == 0)
+ else if (strncmp(argv[i], "-br", 3) == 0)
                         brcname = argv[i][3] ? &argv[i][3] : argv[++i];
                 else if (strcmp(argv[i], "-teleport") == 0)
                         teleport = Teleport;
diff -r 1f00053b6722 -r 101e7939736d Makefile
--- a/Makefile Mon Feb 26 16:04:04 2007 -0500
+++ b/Makefile Tue Feb 27 01:57:01 2007 -0500
@@ -27,7 +27,6 @@ options:
 .hg/00changelog.i:
         @mkdir .hg
         @touch .hg/00changelog.i
-
 # VERSION must be updated on every commit/pull
 config.mk: .hg/00changelog.i
 
diff -r 1f00053b6722 -r 101e7939736d area.c
--- a/area.c Mon Feb 26 16:04:04 2007 -0500
+++ b/area.c Tue Feb 27 01:57:01 2007 -0500
@@ -414,10 +414,11 @@ select_area(Area *a, char *arg) {
         }
         else if(!strncmp(arg, "~", 2)) {
                 new = v->area;
- }else {
+ }
+ else {
                 if(sscanf(arg, "%u", &i) != 1 || i == 0)
                         return Ebadvalue;
- for(new=view->area->next; new->next; new=new->next)
+ for(new=v->area->next; new->next; new=new->next)
                         if(!--i) break;
         }
         focus_area(new);
diff -r 1f00053b6722 -r 101e7939736d rc/rc.wmii
--- a/rc/rc.wmii Mon Feb 26 16:04:04 2007 -0500
+++ b/rc/rc.wmii Tue Feb 27 01:57:01 2007 -0500
@@ -175,7 +175,7 @@ fn read_tags {
 }
 
 fn run_command {
- @{ rfork ens
+ @{ rfork ns
                 path=$oldpath
                 eval exec $* </dev/null
         }
@@ -222,5 +222,5 @@ wmiir read /event |
 wmiir read /event |
         while(*=`{read}) {
                 event = $1; shift
- Event-$event $* >[2]/dev/null
- }
+ Event-$event $*
+ } >[2]/dev/null
Received on Tue Feb 27 2007 - 07:58:44 UTC

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