about summary refs log tree commit diff stats
diff options
context:
space:
mode:
author2022-01-21 09:13:49 -0500
committer2022-01-21 09:13:49 -0500
commit0fc18ac866794a37d803849e44da9fceba86e511 (patch)
treee01315dc90f456aafa6d2e4d88883b3f7e658c70
parent8306102dacd7a1b2830124e9abf28821ca5a35e8 (diff)
parentb8d91c9cb354aab8ebf80283514c4c6c10764d2e (diff)
downloaddwm-0fc18ac866794a37d803849e44da9fceba86e511.tar.gz
-rw-r--r--README.md12
-rw-r--r--config.h1
-rw-r--r--dwm.c2
-rw-r--r--vanitygaps.c8
4 files changed, 17 insertions, 6 deletions
diff --git a/README.md b/README.md
index 538d556..cdc1ab4 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://github.com/lukesmithxyz/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://github.com/lukesmithxyz/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 16e67ff..f304b82 100644
--- a/config.h
+++ b/config.h
@@ -201,6 +201,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} },
 
diff --git a/dwm.c b/dwm.c
index d752216..c0d141d 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1248,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);