diff --git a/README.md b/README.md index bdb7e5b..8bd59d5 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,16 @@ This is my version of dwm with applied patches. Feel free to use it but I recomm ## Features (patches) - anybar + Use any bar. Polybar is default here. + - IPC + Allows for inter-process communication via a socket. + - fullgaps + Gaps between windows in tiled mode. + - actualfullscreen + Fullscreen windows with Super + Shift + f + + - spawncenter + Windows spawn in the center of the screen in floating mode. diff --git a/src/dwm.c b/src/dwm.c index 6d82cba..9f19db8 100644 --- a/src/dwm.c +++ b/src/dwm.c @@ -1132,6 +1132,10 @@ manage(Window w, XWindowAttributes *wa) c->bw = borderpx; wc.border_width = c->bw; + + if(c->x == selmon->wx) c->x += (c->mon->ww - WIDTH(c)) / 2 - c->bw; + if(c->y == selmon->wy) c->y += (c->mon->wh - HEIGHT(c)) / 2 - c->bw; + XConfigureWindow(dpy, w, CWBorderWidth, &wc); XSetWindowBorder(dpy, w, scheme[SchemeNorm][ColBorder].pixel); configure(c); /* propagates border_width, if size doesn't change */