diff --git a/README.md b/README.md
index 0b4e69e..0ef557b 100644
--- a/README.md
+++ b/README.md
@@ -12,16 +12,16 @@ I haven't kept `man dwm`/`dwm.1` updated though. PRs welcome on that, lol.
## Patches and features
-- Clickable statusbar with my build of [dwmblocks](https://git.kusoneko.moe/Kusoneko/dwmblocks).
-- Reads xresources colors/variables (i.e. works with `pywal`, etc.).
+- [Clickable statusbar](https://dwm.suckless.org/patches/statuscmd/) with my build of [dwmblocks](https://git.kusoneko.moe/Kusoneko/dwmblocks).
+- Reads [xresources](https://dwm.suckless.org/patches/xresources/) colors/variables (i.e. works with `pywal`, etc.).
- scratchpad: Accessible with mod+shift+enter.
- New layouts: bstack, fibonacci, deck, centered master and more. All bound to keys `super+(shift+)t/y/u/i`.
- True fullscreen (`super+f`) and prevents focus shifting.
- Windows can be made sticky (`super+s`).
-- stacker: Move windows up the stack manually (`super-K/J`).
-- shiftview: Cycle through tags (`super+g/;`).
-- vanitygaps: Gaps allowed across all layouts.
-- swallow patch: if a program run from a terminal would make it inoperable, it temporarily takes its place to save space.
+- [stacker](https://dwm.suckless.org/patches/stacker/): Move windows up the stack manually (`super-K/J`).
+- [shiftview](https://dwm.suckless.org/patches/nextprev/): Cycle through tags (`super+g/;`).
+- [vanitygaps](https://dwm.suckless.org/patches/vanitygaps/): Gaps allowed across all layouts.
+- [swallow patch](https://dwm.suckless.org/patches/swallow/): if a program run from a terminal would make it inoperable, it temporarily takes its place to save space.
## Installation for newbs
diff --git a/config.h b/config.h
index a08f7e4..690ff83 100644
--- a/config.h
+++ b/config.h
@@ -52,8 +52,9 @@ static const Rule rules[] = {
{ "Gimp", NULL, NULL, 1 << 8, 0, 0, 0, -1 },
{ TERMCLASS, NULL, NULL, 0, 0, 1, 0, -1 },
{ NULL, NULL, "Event Tester", 0, 0, 0, 1, -1 },
- { NULL, "spterm", NULL, SPTAG(0), 1, 1, 0, -1 },
- { NULL, "spcalc", NULL, SPTAG(1), 1, 1, 0, -1 },
+ { TERMCLASS, "bg", NULL, 1 << 7, 0, 1, 0, -1 },
+ { TERMCLASS, "spterm", NULL, SPTAG(0), 1, 1, 0, -1 },
+ { TERMCLASS, "spcalc", NULL, SPTAG(1), 1, 1, 0, -1 },
};
/* layout(s) */
@@ -163,7 +164,7 @@ static Key keys[] = {
{ MODKEY|ShiftMask, XK_w, spawn, SHCMD(TERMINAL " -e sudo nmtui") },
{ MODKEY, XK_e, spawn, SHCMD(TERMINAL " -e neomutt ; pkill -RTMIN+12 dwmblocks; rmdir ~/.abook") },
{ MODKEY|ShiftMask, XK_e, spawn, SHCMD(TERMINAL " -e abook -C ~/.config/abook/abookrc --datafile ~/.config/abook/addressbook") },
- { MODKEY, XK_r, spawn, SHCMD(TERMINAL " -e lf") },
+ { MODKEY, XK_r, spawn, SHCMD(TERMINAL " -e lfub") },
{ MODKEY|ShiftMask, XK_r, spawn, SHCMD(TERMINAL " -e htop") },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, /* tile */
{ MODKEY|ShiftMask, XK_t, setlayout, {.v = &layouts[1]} }, /* bstack */
@@ -201,6 +202,7 @@ static Key keys[] = {
{ MODKEY|ShiftMask, XK_semicolon, shifttag, { .i = 1 } },
{ MODKEY, XK_apostrophe, togglescratch, {.ui = 1} },
/* { MODKEY|ShiftMask, XK_apostrophe, spawn, SHCMD("") }, */
+ { MODKEY|ShiftMask, XK_apostrophe, togglesmartgaps, {0} },
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
{ MODKEY|ShiftMask, XK_Return, togglescratch, {.ui = 0} },
@@ -243,7 +245,7 @@ static Key keys[] = {
{ MODKEY, XK_F8, spawn, SHCMD("mw -Y") },
{ MODKEY, XK_F9, spawn, SHCMD("dmenumount") },
{ MODKEY, XK_F10, spawn, SHCMD("dmenuumount") },
- { MODKEY, XK_F11, spawn, SHCMD("mpv --no-cache --no-osc --no-input-default-bindings --profile=low-latency --input-conf=/dev/null --title=webcam $(ls /dev/video[0,2,4,6,8] | tail -n 1)") },
+ { MODKEY, XK_F11, spawn, SHCMD("mpv --untimed --no-cache --no-osc --no-input-default-bindings --profile=low-latency --input-conf=/dev/null --title=webcam $(ls /dev/video[0,2,4,6,8] | tail -n 1)") },
{ MODKEY, XK_F12, spawn, SHCMD("remaps & notify-send \\\"⌨️ Keyboard remapping...\\\" \\\"Re-running keyboard defaults for any newly plugged-in keyboards.\\\"") },
{ MODKEY, XK_space, zoom, {0} },
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
@@ -275,7 +277,7 @@ static Key keys[] = {
{ 0, XF86XK_ScreenSaver, spawn, SHCMD("slock & xset dpms force off; mpc pause; pauseallmpv") },
{ 0, XF86XK_TaskPane, spawn, SHCMD(TERMINAL " -e htop") },
{ 0, XF86XK_Mail, spawn, SHCMD(TERMINAL " -e neomutt ; pkill -RTMIN+12 dwmblocks") },
- { 0, XF86XK_MyComputer, spawn, SHCMD(TERMINAL " -e lf /") },
+ { 0, XF86XK_MyComputer, spawn, SHCMD(TERMINAL " -e lfub /") },
/* { 0, XF86XK_Battery, spawn, SHCMD("") }, */
{ 0, XF86XK_Launch1, spawn, SHCMD("xset dpms force off") },
{ 0, XF86XK_TouchpadToggle, spawn, SHCMD("(synclient | grep 'TouchpadOff.*1' && synclient TouchpadOff=0) || synclient TouchpadOff=1") },
diff --git a/dwm.c b/dwm.c
index 36b3ddc..f9eb887 100644
--- a/dwm.c
+++ b/dwm.c
@@ -951,8 +951,13 @@ expose(XEvent *e)
void
focus(Client *c)
{
- if (!c || !ISVISIBLE(c))
- for (c = selmon->stack; c && !ISVISIBLE(c); c = c->snext);
+ if (!c || !ISVISIBLE(c)) {
+ for (c = selmon->stack; c && (!ISVISIBLE(c) || (c->issticky && !selmon->sel->issticky)); c = c->snext);
+
+ if (!c) /* No windows found; check for available stickies */
+ for (c = selmon->stack; c && !ISVISIBLE(c); c = c->snext);
+ }
+
if (selmon->sel && selmon->sel != c)
unfocus(selmon->sel, 0);
if (c) {
@@ -1243,6 +1248,8 @@ manage(Window w, XWindowAttributes *wa)
(unsigned char *) &(c->win), 1);
XMoveResizeWindow(dpy, c->win, c->x + 2 * sw, c->y, c->w, c->h); /* some windows require this */
setclientstate(c, NormalState);
+ if(selmon->sel && selmon->sel->isfullscreen && !c->isfloating)
+ setfullscreen(selmon->sel, 0);
if (c->mon == selmon)
unfocus(selmon->sel, 0);
c->mon->sel = c;
diff --git a/vanitygaps.c b/vanitygaps.c
index 7245e74..4c98e69 100644
--- a/vanitygaps.c
+++ b/vanitygaps.c
@@ -8,6 +8,7 @@ static void incrgaps(const Arg *arg);
/* static void incrihgaps(const Arg *arg); */
/* static void incrivgaps(const Arg *arg); */
static void togglegaps(const Arg *arg);
+static void togglesmartgaps(const Arg *arg);
/* Layouts */
static void bstack(Monitor *m);
@@ -49,6 +50,13 @@ togglegaps(const Arg *arg)
}
static void
+togglesmartgaps(const Arg *arg)
+{
+ smartgaps = !smartgaps;
+ arrange(NULL);
+}
+
+static void
defaultgaps(const Arg *arg)
{
setgaps(gappoh, gappov, gappih, gappiv);
|