diff --git a/README.md b/README.md index cc279b9..5815d8f 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,9 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t - [systray](https://dwm.suckless.org/patches/systray/) - adds system tray in the status bar + - [tagmonfixfs](https://github.com/bakkeby/dwm-vanitygaps/blob/master/patches/dwm-tagmonfixfs-6.2.diff) + - allows moving a fullscreen window to another monitor while remaining in fullscreen + - [togglefullscreen](https://github.com/bakkeby/dwm-vanitygaps/blob/master/patches/dwm-togglefullscreen-6.2.diff) - allows you to toggle fullscreen on and off using a single shortcut key diff --git a/dwm.c b/dwm.c index fae2157..0249199 100644 --- a/dwm.c +++ b/dwm.c @@ -1952,9 +1952,20 @@ tag(const Arg *arg) void tagmon(const Arg *arg) { + #if TAGMONFIXFS_PATCH + Client *c = selmon->sel; + if (!c || !mons->next) + return; + sendmon(c, dirtomon(arg->i)); + if (c->isfullscreen) { + setfullscreen(c, 0); + setfullscreen(c, 1); + } + #else if (!selmon->sel || !mons->next) return; sendmon(selmon->sel, dirtomon(arg->i)); + #endif // TAGMONFIXFS_PATCH } void diff --git a/patches.h b/patches.h index d8068f5..b8a87e3 100644 --- a/patches.h +++ b/patches.h @@ -28,11 +28,19 @@ */ #define PERTAGBAR_PATCH 0 +/* If you try to send a fullscreen window to an adjacent monitor using tagmon then + * the window is moved behind the scenes, but it remains in fullscreen on the original + * monitor until you exit fullscreen view (at which point it will appear on the adjacent + * monitor). This patch allows a fullscreen window to be moved to an adjacent monitor + * while remaining in fullscreen. + * https://github.com/bakkeby/dwm-vanitygaps/blob/master/patches/dwm-tagmonfixfs-6.2.diff + */ +#define TAGMONFIXFS_PATCH 0 /* This patch allows you to toggle fullscreen on and off using a single shortcut key. * https://github.com/bakkeby/dwm-vanitygaps/blob/master/patches/dwm-togglefullscreen-6.2.diff */ -#define TOGGLEFULLSCREEN_PATCH 1 +#define TOGGLEFULLSCREEN_PATCH 0 /* The zoomswap patch allows a master and a stack window to swap places * rather than every window on the screen changing position.