sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

commit bca263a670b207ed7d85aedbc3f9410e4f65d705
parent e946e2a4b00aa1132dd01886abb0dd1eb4729623
Author: Aaron Duxler <aaron@duxler.xyz>
Date:   Wed, 13 May 2020 03:31:17 +0200

[dwm][patch] setborderpx minor code style changes

Diffstat:
Mdwm.suckless.org/patches/setborderpx/dwm-setborderpx-6.2.diff | 26++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/dwm.suckless.org/patches/setborderpx/dwm-setborderpx-6.2.diff b/dwm.suckless.org/patches/setborderpx/dwm-setborderpx-6.2.diff @@ -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 @@ -84,6 +84,9 @@ static Key keys[] = { { MODKEY, XK_period, focusmon, {.i = +1 } }, { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, @@ -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 @@ -119,6 +119,7 @@ struct Monitor { int by; /* bar geometry */ int mx, my, mw, mh; /* screen size */ @@ -47,7 +47,7 @@ diff -up a/dwm.c b/dwm.c wc.border_width = c->bw; XConfigureWindow(dpy, w, CWBorderWidth, &wc); -@@ -1424,6 +1427,39 @@ sendmon(Client *c, Monitor *m) +@@ -1424,6 +1427,41 @@ sendmon(Client *c, Monitor *m) } void @@ -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); +} +