trying a different configuration
parent
e36929292e
commit
e995c1b532
|
@ -15,8 +15,8 @@ const char *tags[] = { "work", "net", "fnord", NULL };
|
||||||
#define NORMFGCOLOR "#cccccc"
|
#define NORMFGCOLOR "#cccccc"
|
||||||
#define STATUSBGCOLOR "#dddddd"
|
#define STATUSBGCOLOR "#dddddd"
|
||||||
#define STATUSFGCOLOR "#222222"
|
#define STATUSFGCOLOR "#222222"
|
||||||
#define FLOATSYMBOL "><"
|
#define FLOATSYMBOL "><>"
|
||||||
#define TILESYMBOL "|="
|
#define TILESYMBOL "[]="
|
||||||
|
|
||||||
#define MODKEY Mod1Mask
|
#define MODKEY Mod1Mask
|
||||||
#define MASTERW 60 /* percent */
|
#define MASTERW 60 /* percent */
|
||||||
|
|
9
draw.c
9
draw.c
|
@ -99,16 +99,19 @@ drawstatus()
|
||||||
dc.x = dc.y = 0;
|
dc.x = dc.y = 0;
|
||||||
dc.w = bw;
|
dc.w = bw;
|
||||||
|
|
||||||
drawtext(arrange == dotile ? TILESYMBOL : FLOATSYMBOL, dc.status, False);
|
drawtext(NULL, dc.status, False);
|
||||||
dc.w = modew;
|
|
||||||
for(i = 0; i < ntags; i++) {
|
for(i = 0; i < ntags; i++) {
|
||||||
dc.x += dc.w;
|
|
||||||
dc.w = textw(tags[i]);
|
dc.w = textw(tags[i]);
|
||||||
if(seltag[i])
|
if(seltag[i])
|
||||||
drawtext(tags[i], dc.sel, sel && sel->tags[i]);
|
drawtext(tags[i], dc.sel, sel && sel->tags[i]);
|
||||||
else
|
else
|
||||||
drawtext(tags[i], dc.norm, sel && sel->tags[i]);
|
drawtext(tags[i], dc.norm, sel && sel->tags[i]);
|
||||||
|
dc.x += dc.w;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dc.w = bmw;
|
||||||
|
drawtext(arrange == dotile ? TILESYMBOL : FLOATSYMBOL, dc.status, False);
|
||||||
|
|
||||||
x = dc.x + dc.w;
|
x = dc.x + dc.w;
|
||||||
dc.w = textw(stext);
|
dc.w = textw(stext);
|
||||||
dc.x = bx + bw - dc.w;
|
dc.x = bx + bw - dc.w;
|
||||||
|
|
4
dwm.h
4
dwm.h
|
@ -68,8 +68,8 @@ struct Client {
|
||||||
|
|
||||||
extern const char *tags[];
|
extern const char *tags[];
|
||||||
extern char stext[1024];
|
extern char stext[1024];
|
||||||
extern int screen, sx, sy, sw, sh, bx, by, bw, bh, mw;
|
extern int bx, by, bw, bh, bmw, mw, screen, sx, sy, sw, sh;
|
||||||
extern unsigned int ntags, numlockmask, modew;
|
extern unsigned int ntags, numlockmask;
|
||||||
extern void (*handler[LASTEvent])(XEvent *);
|
extern void (*handler[LASTEvent])(XEvent *);
|
||||||
extern void (*arrange)(Arg *);
|
extern void (*arrange)(Arg *);
|
||||||
extern Atom wmatom[WMLast], netatom[NetLast];
|
extern Atom wmatom[WMLast], netatom[NetLast];
|
||||||
|
|
24
event.c
24
event.c
|
@ -105,21 +105,19 @@ buttonpress(XEvent *e)
|
||||||
XButtonPressedEvent *ev = &e->xbutton;
|
XButtonPressedEvent *ev = &e->xbutton;
|
||||||
|
|
||||||
if(barwin == ev->window) {
|
if(barwin == ev->window) {
|
||||||
if(ev->x < modew)
|
x = 0;
|
||||||
togglemode(NULL);
|
for(a.i = 0; a.i < ntags; a.i++) {
|
||||||
else {
|
x += textw(tags[a.i]);
|
||||||
x = modew;
|
if(ev->x < x) {
|
||||||
for(a.i = 0; a.i < ntags; a.i++) {
|
if(ev->button == Button1)
|
||||||
x += textw(tags[a.i]);
|
view(&a);
|
||||||
if(ev->x < x) {
|
else if(ev->button == Button3)
|
||||||
if(ev->button == Button1)
|
toggleview(&a);
|
||||||
view(&a);
|
return;
|
||||||
else if(ev->button == Button3)
|
|
||||||
toggleview(&a);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(ev->x < x + bmw)
|
||||||
|
togglemode(NULL);
|
||||||
}
|
}
|
||||||
else if((c = getclient(ev->window))) {
|
else if((c = getclient(ev->window))) {
|
||||||
focus(c);
|
focus(c);
|
||||||
|
|
6
main.c
6
main.c
|
@ -19,8 +19,8 @@
|
||||||
|
|
||||||
char stext[1024];
|
char stext[1024];
|
||||||
Bool *seltag;
|
Bool *seltag;
|
||||||
int screen, sx, sy, sw, sh, bx, by, bw, bh, mw;
|
int bx, by, bw, bh, bmw, mw, screen, sx, sy, sw, sh;
|
||||||
unsigned int ntags, numlockmask, modew;
|
unsigned int ntags, numlockmask;
|
||||||
Atom wmatom[WMLast], netatom[NetLast];
|
Atom wmatom[WMLast], netatom[NetLast];
|
||||||
Bool running = True;
|
Bool running = True;
|
||||||
Bool issel = True;
|
Bool issel = True;
|
||||||
|
@ -129,7 +129,7 @@ setup()
|
||||||
dc.status[ColFG] = getcolor(STATUSFGCOLOR);
|
dc.status[ColFG] = getcolor(STATUSFGCOLOR);
|
||||||
setfont(FONT);
|
setfont(FONT);
|
||||||
|
|
||||||
modew = textw(FLOATSYMBOL) > textw(TILESYMBOL) ? textw(FLOATSYMBOL) : textw(TILESYMBOL);
|
bmw = textw(FLOATSYMBOL) > textw(TILESYMBOL) ? textw(FLOATSYMBOL) : textw(TILESYMBOL);
|
||||||
sx = sy = 0;
|
sx = sy = 0;
|
||||||
sw = DisplayWidth(dpy, screen);
|
sw = DisplayWidth(dpy, screen);
|
||||||
sh = DisplayHeight(dpy, screen);
|
sh = DisplayHeight(dpy, screen);
|
||||||
|
|
Loading…
Reference in New Issue