[wiki] [sites] dwm/patches: Add 'unfloatvisible' patch || Alexander Courtis

From: <git_AT_suckless.org>
Date: Mon, 22 Apr 2019 14:50:45 +0200

commit 227c492c51e5b7d2b58538126751a9745ad39508
Author: Alexander Courtis <alex_AT_courtis.org>
Date: Mon Apr 22 22:50:24 2019 +1000

    dwm/patches: Add 'unfloatvisible' patch

diff --git a/dwm.suckless.org/patches/unfloatvisible/dwm-unfloatvisible-6.2.diff b/dwm.suckless.org/patches/unfloatvisible/dwm-unfloatvisible-6.2.diff
new file mode 100644
index 00000000..40c8a3c6
--- /dev/null
+++ b/dwm.suckless.org/patches/unfloatvisible/dwm-unfloatvisible-6.2.diff
_AT_@ -0,0 +1,38 @@
+From a972569532c9d46f79776b0f687ebbbd67a6b69f Mon Sep 17 00:00:00 2001
+From: Alexander Courtis <alex_AT_courtis.org>
+Date: Mon, 22 Apr 2019 22:23:12 +1000
+Subject: [PATCH] unfloat any visible windows which have isfloating set
+
+optionally takes a layout to also apply
+
+e.g.
+{ MODKEY|ShiftMask, XK_space, unfloatvisible, {0} },
+{ MODKEY|ShiftMask, XK_t, unfloatvisible, {.v = &layouts[1]} },
+---
+ unfloat.c | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+ create mode 100644 unfloat.c
+
+diff --git a/unfloat.c b/unfloat.c
+new file mode 100644
+index 0000000..ef84111
+--- /dev/null
++++ b/unfloat.c
+_AT_@ -0,0 +1,14 @@
++void
++unfloatvisible(const Arg *arg)
++{
++ Client *c;
++
++ for (c = selmon->clients; c; c = c->next)
++ if (ISVISIBLE(c) && c->isfloating)
++ c->isfloating = c->isfixed;
++
++ if (arg && arg->v)
++ setlayout(arg);
++ else
++ arrange(selmon);
++}
+--
+2.21.0
+
diff --git a/dwm.suckless.org/patches/unfloatvisible/index.md b/dwm.suckless.org/patches/unfloatvisible/index.md
new file mode 100644
index 00000000..44839c60
--- /dev/null
+++ b/dwm.suckless.org/patches/unfloatvisible/index.md
_AT_@ -0,0 +1,21 @@
+unfloatvisible
+==============
+
+Description
+-----------
+`unfloatvisible` resets isfloating on any visible windows that have it set.
+Optionally also applies a layout.
+
+ #include "push.c"
+ static Key keys[] = {
+ ...
+ { MODKEY|ShiftMask, XK_space, unfloatvisible, {0} },
+ { MODKEY|ShiftMask, XK_t, unfloatvisible, {.v = &layouts[1]} },
+
+Download
+--------
+* [dwm-unfloatvisible-6.2.diff](dwm-unfloatvisible-6.2.diff) (20190422)
+
+Author
+------
+* Alexander Courtis
Received on Mon Apr 22 2019 - 14:50:45 CEST

This archive was generated by hypermail 2.3.0 : Mon Apr 22 2019 - 15:00:31 CEST