From 6b396d0d8428092363f73d867a122150e0f72ce8 Mon Sep 17 00:00:00 2001 From: Jon Glueckstein Date: Mon, 8 Mar 2021 08:57:59 -0500 Subject: [PATCH 1/3] Added function to toggle smartgaps and bound it to Super+Shift+apostrophe. --- config.h | 1 + vanitygaps.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/config.h b/config.h index 424aaeb..e8c48a6 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/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); @@ -48,6 +49,13 @@ togglegaps(const Arg *arg) arrange(NULL); } +static void +togglesmartgaps(const Arg *arg) +{ + smartgaps = !smartgaps; + arrange(NULL); +} + static void defaultgaps(const Arg *arg) { From 53c09ca8fcd429c0f54c7b505b393c0792114bc3 Mon Sep 17 00:00:00 2001 From: Johannes Hove-Henriksen Date: Sun, 21 Nov 2021 19:50:43 +0100 Subject: [PATCH 2/3] added link to patch added link to patch --- README.md | 12 ++++++------ 1 file changed, 6 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 From b8d91c9cb354aab8ebf80283514c4c6c10764d2e Mon Sep 17 00:00:00 2001 From: frei-0xff Date: Fri, 21 Jan 2022 03:56:32 +0200 Subject: [PATCH 3/3] Unset fullscreen on current window when new window is opened --- dwm.c | 2 ++ 1 file changed, 2 insertions(+) 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;