diff --git a/dwm-6.2/config.h b/dwm-6.2/config.h index e36dbdc..7caa19c 100644 --- a/dwm-6.2/config.h +++ b/dwm-6.2/config.h @@ -52,7 +52,7 @@ static const Rule rules[] = { */ /* class instance title tags mask isfloating monitor scratch key */ { "Gimp", NULL, NULL, 0, 1, -1, 0 }, -{ "firefox", NULL, NULL, 0 << 2, 0, -1, 0 }, +{ "firefox", NULL, NULL, 1 << 1, 0, -1, 0 }, { NULL, NULL, "scratchpad", 0, 1, -1, 's' }, { NULL, NULL, "sp_volume", 0, 1, -1, 'v' }, diff --git a/dwm-6.2/dwm b/dwm-6.2/dwm index bd6d97b..8ed3552 100755 Binary files a/dwm-6.2/dwm and b/dwm-6.2/dwm differ diff --git a/dwm-6.2/dwm.c b/dwm-6.2/dwm.c index 8b420e0..9625a75 100644 --- a/dwm-6.2/dwm.c +++ b/dwm-6.2/dwm.c @@ -1138,6 +1138,8 @@ manage(Window w, XWindowAttributes *wa) updatewindowtype(c); updatesizehints(c); updatewmhints(c); + c->x = c->mon->mx + (c->mon->mw - WIDTH(c)) / 2; + c->y = c->mon->my + (c->mon->mh - HEIGHT(c)) / 2; XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask); grabbuttons(c, 0); if (!c->isfloating) diff --git a/dwm-6.2/dwm.c.orig b/dwm-6.2/dwm.c.orig index 42e2cdc..8b420e0 100644 --- a/dwm-6.2/dwm.c.orig +++ b/dwm-6.2/dwm.c.orig @@ -132,6 +132,7 @@ struct Monitor { Monitor *next; Window barwin; const Layout *lt[2]; + unsigned int alttag; }; typedef struct { @@ -221,6 +222,7 @@ static void spawnscratch(const Arg *arg); static void tag(const Arg *arg); static void tagmon(const Arg *arg); static void tile(Monitor *); +static void togglealttag(); static void togglebar(const Arg *arg); static void togglefloating(const Arg *arg); static void togglescratch(const Arg *arg); @@ -756,7 +758,7 @@ dirtomon(int dir) void drawbar(Monitor *m) { - int x, w, tw = 0; + int x, w, wdelta, sw, tw = 0; int boxs = drw->fonts->h / 9; int boxw = drw->fonts->h / 6 + 2; unsigned int i, occ = 0, urg = 0; @@ -777,8 +779,9 @@ drawbar(Monitor *m) x = 0; for (i = 0; i < LENGTH(tags); i++) { w = TEXTW(tags[i]); + wdelta = selmon->alttag ? abs(TEXTW(tags[i]) - TEXTW(tagsalt[i])) / 2 : 0; 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); + drw_text(drw, x, 0, w, bh, wdelta + lrpad / 2, (selmon->alttag ? tagsalt[i] : 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, @@ -1691,6 +1694,14 @@ seturgent(Client *c, int urg) XFree(wmh); } +void +togglealttag() +{ + selmon->alttag = !selmon->alttag; + drawbar(selmon); +} + + void showhide(Client *c) { diff --git a/dwm-6.2/dwm.o b/dwm-6.2/dwm.o index 6f408fd..ba973c6 100644 Binary files a/dwm-6.2/dwm.o and b/dwm-6.2/dwm.o differ diff --git a/dwm-6.2/patches/dwm-alwayscenter-20200625-f04cac6.diff b/dwm-6.2/patches/dwm-alwayscenter-20200625-f04cac6.diff new file mode 100644 index 0000000..03ea9ef --- /dev/null +++ b/dwm-6.2/patches/dwm-alwayscenter-20200625-f04cac6.diff @@ -0,0 +1,12 @@ +diff -up dwm/dwm.c dwmmod/dwm.c +--- dwm/dwm.c 2020-06-25 00:21:30.383692180 -0300 ++++ dwmmod/dwm.c 2020-06-25 00:20:35.643692330 -0300 +@@ -1057,6 +1057,8 @@ manage(Window w, XWindowAttributes *wa) + updatewindowtype(c); + updatesizehints(c); + updatewmhints(c); ++ c->x = c->mon->mx + (c->mon->mw - WIDTH(c)) / 2; ++ c->y = c->mon->my + (c->mon->mh - HEIGHT(c)) / 2; + XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask); + grabbuttons(c, 0); + if (!c->isfloating)