X-Git-Url: http://git.subgeniuskitty.com/dwm/.git/blobdiff_plain/1da78b826a139d24abff8efb490d234968c03096..a583293889ce0ccebf1574dd0c153d121ee05444:/dwm.c diff --git a/dwm.c b/dwm.c index 0b91b0d..f20ee79 100644 --- a/dwm.c +++ b/dwm.c @@ -748,6 +748,7 @@ dirtomon(int dir) void drawbar(Monitor *m) { + int indn; int x, w, tw = 0; int boxs = drw->fonts->h / 9; int boxw = drw->fonts->h / 6 + 2; @@ -771,13 +772,18 @@ drawbar(Monitor *m) } x = 0; for (i = 0; i < LENGTH(tags); i++) { + indn = 0; w = TEXTW(tags[i]); drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]); drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i); - if (occ & 1 << i) - drw_rect(drw, x + boxs, boxs, boxw, boxw, - m == selmon && selmon->sel && selmon->sel->tags & 1 << i, - urg & 1 << i); + + for (c = m->clients; c; c = c->next) { + if (c->tags & (1 << i)) { + drw_rect(drw, x, 1 + (indn * 2), selmon->sel == c ? 6 : 1, 1, 1, urg & 1 << i); + indn++; + } + } + x += w; } w = TEXTW(m->ltsymbol); @@ -1271,7 +1277,9 @@ nametag(const Arg *arg) { int i; errno = 0; // popen(3p) says on failure it "may" set errno - if(!(f = popen("dmenu < /dev/null", "r"))) { + // TODO: Create a central location for the dmenu font specification. + // It should not be hardcoded in multiple locations. + if(!(f = popen("dmenu -fn monospace:size=14 < /dev/null", "r"))) { fprintf(stderr, "dwm: popen 'dmenu < /dev/null' failed%s%s\n", errno ? ": " : "", errno ? strerror(errno) : ""); return; } @@ -1352,7 +1360,9 @@ quit(const Arg *arg) void quitprompt(const Arg *arg) { - FILE *pp = popen("echo -e \"no\nrestart\nyes\" | dmenu -i -sb red -p \"Quit DWM?\"", "r"); + // TODO: Create a central location for the dmenu font specification. + // It should not be hardcoded in multiple locations. + FILE *pp = popen("echo -e \"no\nrestart\nyes\" | dmenu -fn monospace:size=14 -i -sb red -p \"Quit DWM?\"", "r"); if(pp != NULL) { char buf[1024]; if (fgets(buf, sizeof(buf), pp) == NULL) { @@ -2264,7 +2274,7 @@ main(int argc, char *argv[]) cleanup(); XCloseDisplay(dpy); if (restart == 1) { - execlp("dwm", "dwm", NULL); + execlp("dwm-sgk", "dwm-sgk", NULL); } return EXIT_SUCCESS; }