diff options
| -rw-r--r-- | config.h | 77 | ||||
| -rwxr-xr-x | dwm | bin | 75544 -> 75672 bytes | |||
| -rw-r--r-- | dwm.c | 39 | ||||
| -rw-r--r-- | dwm.o | bin | 62576 -> 63176 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | patch/dwm-fibonacci-20200418-c82db69.diff | 0 | ||||
| -rw-r--r--[-rwxr-xr-x] | patch/dwm-focusonclick-20200110-61bb8b2.diff | 0 | ||||
| -rw-r--r-- | patch/dwm-setborderpx-6.2.diff | 90 | ||||
| -rw-r--r--[-rwxr-xr-x] | patch/dwm-statusallmons-20160731-56a31dc.diff | 0 | ||||
| -rw-r--r--[-rwxr-xr-x] | patch/dwm-swallow-6.2.diff | 0 | ||||
| -rw-r--r--[-rwxr-xr-x] | patch/dwm-vanitygaps-20200610-f09418b.diff | 0 |
10 files changed, 168 insertions, 38 deletions
@@ -79,43 +79,46 @@ static const char *downvol[] = { "/usr/bin/wpctl", "set-volume", "@DEFAULT_AUDIO static const char *mutevol[] = { "/usr/bin/wpctl", "set-mute", "@DEFAULT_AUDIO_SINK@", "toggle", NULL }; static Key keys[] = { - /* modifier key function argument */ - { MODKEY, XK_p, spawn, {.v = dmenucmd } }, - { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, - { MODKEY|ShiftMask, XK_b, togglebar, {0} }, - { MODKEY, XK_j, focusstack, {.i = +1 } }, - { MODKEY, XK_k, focusstack, {.i = -1 } }, - { MODKEY, XK_i, incnmaster, {.i = +1 } }, - { MODKEY, XK_d, incnmaster, {.i = -1 } }, - { MODKEY, XK_h, setmfact, {.f = -0.05} }, - { MODKEY, XK_l, setmfact, {.f = +0.05} }, - { MODKEY, XK_minus, incrgaps, {.i = +1 } }, - { MODKEY, XK_equal, incrgaps, {.i = -1 } }, - { MODKEY|ShiftMask, XK_minus, incrogaps, {.i = +1 } }, - { MODKEY|ShiftMask, XK_equal, incrogaps, {.i = -1 } }, - { MODKEY|ControlMask, XK_minus, incrigaps, {.i = +1 } }, - { MODKEY|ControlMask, XK_equal, incrigaps, {.i = -1 } }, - { MODKEY, XK_0, togglegaps, {0} }, - { MODKEY|ShiftMask, XK_0, defaultgaps, {0} }, - { MODKEY, XK_Return, zoom, {0} }, - { MODKEY, XK_Tab, view, {0} }, - { MODKEY|ShiftMask, XK_c, killclient, {0} }, - { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, - { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, - { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, - { MODKEY, XK_r, setlayout, {.v = &layouts[3]} }, - { MODKEY|ShiftMask, XK_r, setlayout, {.v = &layouts[4]} }, - { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, - { MODKEY, XK_comma, focusmon, {.i = -1 } }, - { MODKEY, XK_period, focusmon, {.i = +1 } }, - { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, - { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, - { MODKEY|ControlMask, XK_b, spawn, SHCMD("xdotool type $( grep -v '^#' ~/docs/random/bookmarks.txt | dmenu -i -l 50 | cut -d' ' -f1 )") }, - { MODKEY|ControlMask, XK_l, spawn, SHCMD("xdotool type \"cat $( /usr/bin/ls -d ~/docs/lyrics/* | dmenu -i -l 50)\"") }, - { MODKEY, XK_b, spawn, SHCMD("firefox") }, - { MODKEY, XK_e, spawn, SHCMD("emacsclient -c -a 'emacs'") }, - { MODKEY, XK_Print, spawn, SHCMD("sleep 0.3s; scrot -s -e 'mv $f ~/pics/'") }, - { 0, XK_Print, spawn, SHCMD("scrot -u -e 'mv $f ~/pics/'") }, + /* modifier key function argument */ + { MODKEY, XK_p, spawn, {.v = dmenucmd } }, + { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, + { MODKEY|ShiftMask, XK_b, togglebar, {0} }, + { MODKEY, XK_j, focusstack, {.i = +1 } }, + { MODKEY, XK_k, focusstack, {.i = -1 } }, + { MODKEY, XK_i, incnmaster, {.i = +1 } }, + { MODKEY, XK_d, incnmaster, {.i = -1 } }, + { MODKEY, XK_h, setmfact, {.f = -0.05} }, + { MODKEY, XK_l, setmfact, {.f = +0.05} }, + { MODKEY, XK_minus, incrgaps, {.i = +1 } }, + { MODKEY, XK_equal, incrgaps, {.i = -1 } }, + { MODKEY|ShiftMask, XK_minus, incrogaps, {.i = +1 } }, + { MODKEY|ShiftMask, XK_equal, incrogaps, {.i = -1 } }, + { MODKEY|ControlMask, XK_minus, incrigaps, {.i = +1 } }, + { MODKEY|ControlMask, XK_equal, incrigaps, {.i = -1 } }, + { MODKEY, XK_bracketleft, setborderpx, {.i = +1 } }, + { MODKEY, XK_bracketright, setborderpx, {.i = -1 } }, + { MODKEY, XK_backslash, setborderpx, {.i = 0 } }, + { MODKEY, XK_0, togglegaps, {0} }, + { MODKEY|ShiftMask, XK_0, defaultgaps, {0} }, + { MODKEY, XK_Return, zoom, {0} }, + { MODKEY, XK_Tab, view, {0} }, + { MODKEY|ShiftMask, XK_c, killclient, {0} }, + { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, + { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, + { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, + { MODKEY, XK_r, setlayout, {.v = &layouts[3]} }, + { MODKEY|ShiftMask, XK_r, setlayout, {.v = &layouts[4]} }, + { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, + { MODKEY, XK_comma, focusmon, {.i = -1 } }, + { MODKEY, XK_period, focusmon, {.i = +1 } }, + { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, + { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, + { MODKEY|ControlMask, XK_b, spawn, SHCMD("xdotool type $( grep -v '^#' ~/docs/random/bookmarks.txt | dmenu -i -l 50 | cut -d' ' -f1 )") }, + { MODKEY|ControlMask, XK_l, spawn, SHCMD("xdotool type \"cat $( /usr/bin/ls -d ~/docs/lyrics/* | dmenu -i -l 50)\"") }, + { MODKEY, XK_b, spawn, SHCMD("firefox") }, + { MODKEY, XK_e, spawn, SHCMD("emacsclient -c -a 'emacs'") }, + { MODKEY, XK_Print, spawn, SHCMD("sleep 0.3s; scrot -s -e 'mv $f ~/pics/'") }, + { 0, XK_Print, spawn, SHCMD("scrot -u -e 'mv $f ~/pics/'") }, TAGKEYS( XK_1, 0) TAGKEYS( XK_2, 1) TAGKEYS( XK_3, 2) Binary files differ@@ -133,6 +133,7 @@ struct Monitor { int gappoh; /* horizontal outer gaps */ int gappov; /* vertical outer gaps */ int gappx; /* gaps between windows */ + unsigned int borderpx; unsigned int seltags; unsigned int sellt; unsigned int tagset[2]; @@ -211,6 +212,7 @@ static void run(void); static void scan(void); static int sendevent(Client *c, Atom proto); static void sendmon(Client *c, Monitor *m); +static void setborderpx(const Arg *arg); static void setclientstate(Client *c, long state); static void setfocus(Client *c); static void setfullscreen(Client *c, int fullscreen); @@ -711,6 +713,7 @@ createmon(void) m->nmaster = nmaster; m->showbar = showbar; m->topbar = topbar; + m->borderpx = borderpx; m->gappih = gappih; m->gappiv = gappiv; m->gappoh = gappoh; @@ -1109,7 +1112,7 @@ manage(Window w, XWindowAttributes *wa) c->y = c->mon->wy + c->mon->wh - HEIGHT(c); c->x = MAX(c->x, c->mon->wx); c->y = MAX(c->y, c->mon->wy); - c->bw = borderpx; + c->bw = c->mon->borderpx; wc.border_width = c->bw; XConfigureWindow(dpy, w, CWBorderWidth, &wc); @@ -1469,6 +1472,40 @@ sendmon(Client *c, Monitor *m) } void +setborderpx(const Arg *arg) +{ + Client *c; + int prev_borderpx = selmon->borderpx; + + if (arg->i == 0) + selmon->borderpx = borderpx; + else if (selmon->borderpx + arg->i < 0) + selmon->borderpx = 0; + else + selmon->borderpx += arg->i; + + for (c = selmon->clients; c; c = c->next) + { + 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) + resizeclient(c, c->x, c->y, c->w, c->h); + else if (prev_borderpx > borderpx) + resize(c, c->x, c->y, c->w + 2*(prev_borderpx - borderpx), c->h + 2*(prev_borderpx - borderpx), 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); +} + +void setclientstate(Client *c, long state) { long data[] = { state, None }; Binary files differdiff --git a/patch/dwm-fibonacci-20200418-c82db69.diff b/patch/dwm-fibonacci-20200418-c82db69.diff index 81bba7a..81bba7a 100755..100644 --- a/patch/dwm-fibonacci-20200418-c82db69.diff +++ b/patch/dwm-fibonacci-20200418-c82db69.diff diff --git a/patch/dwm-focusonclick-20200110-61bb8b2.diff b/patch/dwm-focusonclick-20200110-61bb8b2.diff index 59c7a1d..59c7a1d 100755..100644 --- a/patch/dwm-focusonclick-20200110-61bb8b2.diff +++ b/patch/dwm-focusonclick-20200110-61bb8b2.diff diff --git a/patch/dwm-setborderpx-6.2.diff b/patch/dwm-setborderpx-6.2.diff new file mode 100644 index 0000000..6a82087 --- /dev/null +++ b/patch/dwm-setborderpx-6.2.diff @@ -0,0 +1,90 @@ +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-13 03:27:51.018695798 +0200 +@@ -84,6 +84,9 @@ static Key keys[] = { + { MODKEY, XK_period, focusmon, {.i = +1 } }, + { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, + { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, ++ { MODKEY|ShiftMask, XK_minus, setborderpx, {.i = -1 } }, ++ { MODKEY|ShiftMask, XK_plus, setborderpx, {.i = +1 } }, ++ { MODKEY|ShiftMask, XK_numbersign, setborderpx, {.i = 0 } }, + TAGKEYS( XK_1, 0) + TAGKEYS( XK_2, 1) + 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-14 00:17:35.047919771 +0200 +@@ -119,6 +119,7 @@ struct Monitor { + int by; /* bar geometry */ + int mx, my, mw, mh; /* screen size */ + int wx, wy, ww, wh; /* window area */ ++ unsigned int borderpx; + unsigned int seltags; + unsigned int sellt; + unsigned int tagset[2]; +@@ -196,6 +197,7 @@ static void run(void); + static void scan(void); + static int sendevent(Client *c, Atom proto); + static void sendmon(Client *c, Monitor *m); ++static void setborderpx(const Arg *arg); + static void setclientstate(Client *c, long state); + static void setfocus(Client *c); + static void setfullscreen(Client *c, int fullscreen); +@@ -638,6 +640,7 @@ createmon(void) + m->nmaster = nmaster; + m->showbar = showbar; + m->topbar = topbar; ++ m->borderpx = borderpx; + m->lt[0] = &layouts[0]; + m->lt[1] = &layouts[1 % LENGTH(layouts)]; + strncpy(m->ltsymbol, layouts[0].symbol, sizeof m->ltsymbol); +@@ -1047,7 +1050,7 @@ manage(Window w, XWindowAttributes *wa) + /* only fix client y-offset, if the client center might cover the bar */ + c->y = MAX(c->y, ((c->mon->by == c->mon->my) && (c->x + (c->w / 2) >= c->mon->wx) + && (c->x + (c->w / 2) < c->mon->wx + c->mon->ww)) ? bh : c->mon->my); +- c->bw = borderpx; ++ c->bw = c->mon->borderpx; + + wc.border_width = c->bw; + XConfigureWindow(dpy, w, CWBorderWidth, &wc); +@@ -1424,6 +1427,40 @@ sendmon(Client *c, Monitor *m) + } + + void ++setborderpx(const Arg *arg) ++{ ++ Client *c; ++ int prev_borderpx = selmon->borderpx; ++ ++ if (arg->i == 0) ++ selmon->borderpx = borderpx; ++ else if (selmon->borderpx + arg->i < 0) ++ selmon->borderpx = 0; ++ else ++ selmon->borderpx += arg->i; ++ ++ for (c = selmon->clients; c; c = c->next) ++ { ++ 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) ++ resizeclient(c, c->x, c->y, c->w, c->h); ++ else if (prev_borderpx > borderpx) ++ resize(c, c->x, c->y, c->w + 2*(prev_borderpx - borderpx), c->h + 2*(prev_borderpx - borderpx), 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); ++} ++ ++void + setclientstate(Client *c, long state) + { + long data[] = { state, None }; diff --git a/patch/dwm-statusallmons-20160731-56a31dc.diff b/patch/dwm-statusallmons-20160731-56a31dc.diff index 126d974..126d974 100755..100644 --- a/patch/dwm-statusallmons-20160731-56a31dc.diff +++ b/patch/dwm-statusallmons-20160731-56a31dc.diff diff --git a/patch/dwm-swallow-6.2.diff b/patch/dwm-swallow-6.2.diff index 5324024..5324024 100755..100644 --- a/patch/dwm-swallow-6.2.diff +++ b/patch/dwm-swallow-6.2.diff diff --git a/patch/dwm-vanitygaps-20200610-f09418b.diff b/patch/dwm-vanitygaps-20200610-f09418b.diff index b921e76..b921e76 100755..100644 --- a/patch/dwm-vanitygaps-20200610-f09418b.diff +++ b/patch/dwm-vanitygaps-20200610-f09418b.diff |
