renamed seltag into seltags
This commit is contained in:
parent
a923298d35
commit
86953bd682
2
draw.c
2
draw.c
|
@ -55,7 +55,7 @@ drawstatus(void) {
|
||||||
dc.x = dc.y = 0;
|
dc.x = dc.y = 0;
|
||||||
for(i = 0; i < ntags; i++) {
|
for(i = 0; i < ntags; i++) {
|
||||||
dc.w = textw(tags[i]);
|
dc.w = textw(tags[i]);
|
||||||
if(seltag[i]) {
|
if(seltags[i]) {
|
||||||
drawtext(tags[i], dc.sel);
|
drawtext(tags[i], dc.sel);
|
||||||
drawsquare(sel && sel->tags[i], isoccupied(i), dc.sel);
|
drawsquare(sel && sel->tags[i], isoccupied(i), dc.sel);
|
||||||
}
|
}
|
||||||
|
|
2
dwm.h
2
dwm.h
|
@ -82,7 +82,7 @@ extern unsigned int bh, blw, bpos; /* bar height, bar layout label width, bar p
|
||||||
extern unsigned int ntags, numlockmask; /* number of tags, numlock mask */
|
extern unsigned int ntags, numlockmask; /* number of tags, numlock mask */
|
||||||
extern void (*handler[LASTEvent])(XEvent *); /* event handler */
|
extern void (*handler[LASTEvent])(XEvent *); /* event handler */
|
||||||
extern Atom dwmconfig, wmatom[WMLast], netatom[NetLast];
|
extern Atom dwmconfig, wmatom[WMLast], netatom[NetLast];
|
||||||
extern Bool selscreen, *seltag; /* seltag is array of Bool */
|
extern Bool selscreen, *seltags; /* seltags is array of Bool */
|
||||||
extern Client *clients, *sel, *stack; /* global client list and stack */
|
extern Client *clients, *sel, *stack; /* global client list and stack */
|
||||||
extern Cursor cursor[CurLast];
|
extern Cursor cursor[CurLast];
|
||||||
extern DC dc; /* global draw context */
|
extern DC dc; /* global draw context */
|
||||||
|
|
8
main.c
8
main.c
|
@ -21,7 +21,7 @@ unsigned int bh, ntags;
|
||||||
unsigned int bpos = BARPOS;
|
unsigned int bpos = BARPOS;
|
||||||
unsigned int numlockmask = 0;
|
unsigned int numlockmask = 0;
|
||||||
Atom dwmconfig, wmatom[WMLast], netatom[NetLast];
|
Atom dwmconfig, wmatom[WMLast], netatom[NetLast];
|
||||||
Bool *seltag;
|
Bool *seltags;
|
||||||
Bool selscreen = True;
|
Bool selscreen = True;
|
||||||
Client *clients = NULL;
|
Client *clients = NULL;
|
||||||
Client *sel = NULL;
|
Client *sel = NULL;
|
||||||
|
@ -57,7 +57,7 @@ cleanup(void) {
|
||||||
XFreeCursor(dpy, cursor[CurMove]);
|
XFreeCursor(dpy, cursor[CurMove]);
|
||||||
XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
|
XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
|
||||||
XSync(dpy, False);
|
XSync(dpy, False);
|
||||||
free(seltag);
|
free(seltags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned long
|
static unsigned long
|
||||||
|
@ -170,8 +170,8 @@ setup(void) {
|
||||||
grabkeys();
|
grabkeys();
|
||||||
compileregs();
|
compileregs();
|
||||||
for(ntags = 0; tags[ntags]; ntags++);
|
for(ntags = 0; tags[ntags]; ntags++);
|
||||||
seltag = emallocz(sizeof(Bool) * ntags);
|
seltags = emallocz(sizeof(Bool) * ntags);
|
||||||
seltag[0] = True;
|
seltags[0] = True;
|
||||||
/* style */
|
/* style */
|
||||||
dc.norm[ColBorder] = initcolor(NORMBORDERCOLOR);
|
dc.norm[ColBorder] = initcolor(NORMBORDERCOLOR);
|
||||||
dc.norm[ColBG] = initcolor(NORMBGCOLOR);
|
dc.norm[ColBG] = initcolor(NORMBGCOLOR);
|
||||||
|
|
14
tag.c
14
tag.c
|
@ -84,7 +84,7 @@ isvisible(Client *c) {
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
for(i = 0; i < ntags; i++)
|
for(i = 0; i < ntags; i++)
|
||||||
if(c->tags[i] && seltag[i])
|
if(c->tags[i] && seltags[i])
|
||||||
return True;
|
return True;
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ settags(Client *c, Client *trans) {
|
||||||
}
|
}
|
||||||
if(!matched)
|
if(!matched)
|
||||||
for(i = 0; i < ntags; i++)
|
for(i = 0; i < ntags; i++)
|
||||||
c->tags[i] = seltag[i];
|
c->tags[i] = seltags[i];
|
||||||
persistconfig(c);
|
persistconfig(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -190,10 +190,10 @@ toggleview(const char *arg) {
|
||||||
unsigned int i, j;
|
unsigned int i, j;
|
||||||
|
|
||||||
i = idxoftag(arg);
|
i = idxoftag(arg);
|
||||||
seltag[i] = !seltag[i];
|
seltags[i] = !seltags[i];
|
||||||
for(j = 0; j < ntags && !seltag[j]; j++);
|
for(j = 0; j < ntags && !seltags[j]; j++);
|
||||||
if(j == ntags)
|
if(j == ntags)
|
||||||
seltag[i] = True; /* cannot toggle last view */
|
seltags[i] = True; /* cannot toggle last view */
|
||||||
arrange();
|
arrange();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,9 +202,9 @@ view(const char *arg) {
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
for(i = 0; i < ntags; i++)
|
for(i = 0; i < ntags; i++)
|
||||||
seltag[i] = arg == NULL;
|
seltags[i] = arg == NULL;
|
||||||
i = idxoftag(arg);
|
i = idxoftag(arg);
|
||||||
if(i >= 0 && i < ntags)
|
if(i >= 0 && i < ntags)
|
||||||
seltag[i] = True;
|
seltags[i] = True;
|
||||||
arrange();
|
arrange();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue