Merge pull request #4 from E-Almqvist/spawncenter

Spawn center patch
pull/5/head
E. Almqvist 4 years ago committed by GitHub
commit 9b6d23fb5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      README.md
  2. 4
      src/dwm.c

@ -4,6 +4,16 @@ This is my version of dwm with applied patches. Feel free to use it but I recomm
## Features (patches) ## Features (patches)
- anybar - anybar
Use any bar. Polybar is default here.
- IPC - IPC
Allows for inter-process communication via a socket.
- fullgaps - fullgaps
Gaps between windows in tiled mode.
- actualfullscreen - actualfullscreen
Fullscreen windows with Super + Shift + f
- spawncenter
Windows spawn in the center of the screen in floating mode.

@ -1132,6 +1132,10 @@ manage(Window w, XWindowAttributes *wa)
c->bw = borderpx; c->bw = borderpx;
wc.border_width = c->bw; 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); XConfigureWindow(dpy, w, CWBorderWidth, &wc);
XSetWindowBorder(dpy, w, scheme[SchemeNorm][ColBorder].pixel); XSetWindowBorder(dpy, w, scheme[SchemeNorm][ColBorder].pixel);
configure(c); /* propagates border_width, if size doesn't change */ configure(c); /* propagates border_width, if size doesn't change */

Loading…
Cancel
Save