X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tag.c;h=f6c33ea2209115952f36911cc2b989228377c589;hb=ab7a11c0c73fa101c8e0234f8214284888fb8156;hp=13e22af0980110d93822cee21528ae7ba4281f52;hpb=937cabfa0aad7eef6d25e9d142a478163de200c5;p=dwm.git diff --git a/tag.c b/tag.c index 13e22af..f6c33ea 100644 --- a/tag.c +++ b/tag.c @@ -18,24 +18,10 @@ typedef struct { Bool isfloat; } Rule; -/* CUSTOMIZE */ -static Rule rule[] = { - /* class:instance tags isfloat */ - { "Firefox.*", { [Tnet] = "net" }, False }, - { "Gimp.*", { 0 }, True}, -}; +TAGS +RULES -char *tags[TLast] = { - [Tfnord] = "fnord", - [Tdev] = "dev", - [Tnet] = "net", - [Twork] = "work", - [Tmisc] = "misc", -}; - -void (*arrange)(Arg *) = dotile; - -/* END CUSTOMIZE */ +void (*arrange)(Arg *) = DEFMODE; /* extern */ @@ -67,6 +53,8 @@ dofloat(Arg *arg) higher(sel); focus(sel); } + else + XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); } drawall(); } @@ -130,6 +118,8 @@ dotile(Arg *arg) higher(sel); focus(sel); } + else + XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); } drawall(); } @@ -212,3 +202,17 @@ view(Arg *arg) arrange(NULL); drawall(); } + +void +viewnext(Arg *arg) +{ + arg->i = (tsel < TLast-1) ? tsel+1 : 0; + view(arg); +} + +void +viewprev(Arg *arg) +{ + arg->i = (tsel > 0) ? tsel-1 : TLast-1; + view(arg); +}