wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit 93b89970f8c9fa6b0f05486ee9a2285de2899bc8
parent 8ba567929c8c240870d51a8e6fb6ee34d23498a8
Author: Kris Maglione <jg@suckless.org>
Date:   Tue, 27 Feb 2007 01:57:01 -0500

Fix selection of views by index.

Diffstat:
9menu.c | 10+++++-----
Makefile | 1-
area.c | 5+++--
rc/rc.wmii | 6+++---
4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/9menu.c b/9menu.c @@ -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 --git a/Makefile b/Makefile @@ -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 --git a/area.c b/area.c @@ -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 --git a/rc/rc.wmii b/rc/rc.wmii @@ -175,7 +175,7 @@ fn read_tags { } fn run_command { - @{ rfork ens + @{ rfork ns path=$oldpath eval exec $* </dev/null } @@ -222,5 +222,5 @@ if(echo Start wmiirc | ! wmiir write /event >[2]/dev/null) wmiir read /event | while(*=`{read}) { event = $1; shift - Event-$event $* >[2]/dev/null - } + Event-$event $* + } >[2]/dev/null