dwm-uselessgap-5.8.diff - sites - public wiki contents of suckless.org | |
git clone git://git.suckless.org/sites | |
Log | |
Files | |
Refs | |
--- | |
dwm-uselessgap-5.8.diff (1763B) | |
--- | |
1 diff -r 72e52c5333ef config.def.h | |
2 --- a/config.def.h Wed Nov 25 13:56:17 2009 +0000 | |
3 +++ b/config.def.h Thu Mar 11 16:32:24 2010 +0100 | |
4 @@ -9,6 +9,7 @@ | |
5 static const char selbgcolor[] = "#0066ff"; | |
6 static const char selfgcolor[] = "#ffffff"; | |
7 static const unsigned int borderpx = 1; /* border pixel of wind… | |
8 +static const unsigned int gappx = 6; /* gap pixel between wi… | |
9 static const unsigned int snap = 32; /* snap pixel */ | |
10 static const Bool showbar = True; /* False means no bar */ | |
11 static const Bool topbar = True; /* False means bottom b… | |
12 diff -r 72e52c5333ef dwm.c | |
13 --- a/dwm.c Wed Nov 25 13:56:17 2009 +0000 | |
14 +++ b/dwm.c Thu Mar 11 16:32:24 2010 +0100 | |
15 @@ -269,6 +269,7 @@ | |
16 static DC dc; | |
17 static Monitor *mons = NULL, *selmon = NULL; | |
18 static Window root; | |
19 +static int globalborder ; | |
20 | |
21 /* configuration, allows nested code to access above variables */ | |
22 #include "config.h" | |
23 @@ -1299,16 +1300,21 @@ | |
24 resize(Client *c, int x, int y, int w, int h, Bool interact) { | |
25 XWindowChanges wc; | |
26 | |
27 + if(c->isfloating || selmon->lt[selmon->sellt]->arrange == NULL)… | |
28 + else { | |
29 + if (selmon->lt[selmon->sellt]->arrange == monocle) { gl… | |
30 + else { globalborder = gappx ; } | |
31 + } | |
32 if(applysizehints(c, &x, &y, &w, &h, interact)) { | |
33 - c->x = wc.x = x; | |
34 - c->y = wc.y = y; | |
35 - c->w = wc.width = w; | |
36 - c->h = wc.height = h; | |
37 + c->x = wc.x = x + globalborder; | |
38 + c->y = wc.y = y + globalborder; | |
39 + c->w = wc.width = w - 2 * globalborder ; | |
40 + c->h = wc.height = h - 2 * globalborder ; | |
41 wc.border_width = c->bw; | |
42 XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|… | |
43 configure(c); | |
44 XSync(dpy, False); | |
45 - } | |
46 + } | |
47 } | |
48 | |
49 void |