[wiki] [sites] [dwm][patch] setborderpx minor code style changes || Aaron Duxler
commit bca263a670b207ed7d85aedbc3f9410e4f65d705
Author: Aaron Duxler <aaron_AT_duxler.xyz>
Date: Wed May 13 03:31:17 2020 +0200
[dwm][patch] setborderpx minor code style changes
diff --git a/dwm.suckless.org/patches/setborderpx/dwm-setborderpx-6.2.diff b/dwm.suckless.org/patches/setborderpx/dwm-setborderpx-6.2.diff
index 9334accf..9ba2ae0a 100644
--- a/dwm.suckless.org/patches/setborderpx/dwm-setborderpx-6.2.diff
+++ b/dwm.suckless.org/patches/setborderpx/dwm-setborderpx-6.2.diff
_AT_@ -1,6 +1,6 @@
diff -up a/config.def.h b/config.def.h
--- a/config.def.h 2020-05-12 02:17:20.070933833 +0200
-+++ b/config.def.h 2020-05-12 02:21:55.438342205 +0200
++++ b/config.def.h 2020-05-13 03:22:42.208588454 +0200
_AT_@ -84,6 +84,9 @@ static Key keys[] = {
{ MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
_AT_@ -13,7 +13,7 @@ diff -up a/config.def.h b/config.def.h
TAGKEYS( XK_3, 2)
diff -up a/dwm.c b/dwm.c
--- a/dwm.c 2020-05-12 02:17:20.070933833 +0200
-+++ b/dwm.c 2020-05-12 02:27:00.845833215 +0200
++++ b/dwm.c 2020-05-13 03:26:48.248734286 +0200
_AT_@ -119,6 +119,7 @@ struct Monitor {
int by; /* bar geometry */
int mx, my, mw, mh; /* screen size */
_AT_@ -47,7 +47,7 @@ diff -up a/dwm.c b/dwm.c
wc.border_width = c->bw;
XConfigureWindow(dpy, w, CWBorderWidth, &wc);
-_AT_@ -1424,6 +1427,39 @@ sendmon(Client *c, Monitor *m)
+_AT_@ -1424,6 +1427,41 @@ sendmon(Client *c, Monitor *m)
}
void
_AT_@ -68,18 +68,20 @@ diff -up a/dwm.c b/dwm.c
+ if (c->bw + arg->i < 0)
+ c->bw = selmon->borderpx = 0;
+ else
-+ c->bw = selmon->borderpx;
-+ if (c->isfloating || !selmon->lt[selmon->sellt]->arrange)
+ {
-+ if (arg->i != 0 && prev_borderpx + arg->i >= 0)
-+ resize(c, c->x, c->y, c->w-(arg->i*2), c->h-(arg->i*2), 0);
-+ else if (arg->i == 0 && prev_borderpx > borderpx)
-+ resize(c, c->x + prev_borderpx - borderpx, c->y + prev_borderpx - borderpx, c->w, c->h, 0);
-+ else if (arg->i == 0 && prev_borderpx < borderpx)
-+ resize(c, c->x, c->y, c->w-2*(borderpx - prev_borderpx), c->h-2*(borderpx - prev_borderpx), 0);
++ c->bw = selmon->borderpx;
++
++ if (c->isfloating || !selmon->lt[selmon->sellt]->arrange)
++ {
++ if (arg->i != 0)
++ resize(c, c->x, c->y, c->w-(arg->i*2), c->h-(arg->i*2), 0);
++ else if (prev_borderpx > borderpx)
++ resize(c, c->x + prev_borderpx - borderpx, c->y + prev_borderpx - borderpx, c->w, c->h, 0);
++ else if (prev_borderpx < borderpx)
++ resize(c, c->x, c->y, c->w-2*(borderpx - prev_borderpx), c->h-2*(borderpx - prev_borderpx), 0);
++ }
+ }
+ }
-+
+ arrange(selmon);
+}
+
Received on Wed May 13 2020 - 03:31:44 CEST
This archive was generated by hypermail 2.3.0
: Wed May 13 2020 - 03:36:48 CEST