[wiki] [sites] Added fullscreen patch to dwm || Egidius Mysliwietz
commit 94c80a23ca9bf6df5b8d8099c423e92b8d32032f
Author: Egidius Mysliwietz <egidius_AT_mysliwietz.dej>
Date: Mon Jul 8 01:29:28 2019 +0200
Added fullscreen patch to dwm
diff --git a/dwm.suckless.org/patches/fullscreen/dwm-fullscreen-6.2.diff b/dwm.suckless.org/patches/fullscreen/dwm-fullscreen-6.2.diff
new file mode 100644
index 00000000..36e31405
--- /dev/null
+++ b/dwm.suckless.org/patches/fullscreen/dwm-fullscreen-6.2.diff
_AT_@ -0,0 +1,56 @@
+From 54719285bd1a984e2efce6e8a8eab184fec11abf Mon Sep 17 00:00:00 2001
+From: Sermak <sermak_AT_jarvis.com>
+Date: Mon, 8 Jul 2019 01:06:44 +0200
+Subject: [PATCH] Simulate toggleable fullscreen mode
+
+---
+ config.def.h | 1 +
+ dwm.c | 14 ++++++++++++++
+ 2 files changed, 15 insertions(+)
+
+diff --git a/config.def.h b/config.def.h
+index 1c0b587..f774cc5 100644
+--- a/config.def.h
++++ b/config.def.h
+_AT_@ -76,6 +76,7 @@ static Key keys[] = {
+ { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
+ { MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
+ { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
++ { MODKEY|ShiftMask, XK_f, fullscreen, {0} },
+ { MODKEY, XK_space, setlayout, {0} },
+ { MODKEY|ShiftMask, XK_space, togglefloating, {0} },
+ { MODKEY, XK_0, view, {.ui = ~0 } },
+diff --git a/dwm.c b/dwm.c
+index 4465af1..04b1e06 100644
+--- a/dwm.c
++++ b/dwm.c
+_AT_@ -199,6 +199,7 @@ static void sendmon(Client *c, Monitor *m);
+ static void setclientstate(Client *c, long state);
+ static void setfocus(Client *c);
+ static void setfullscreen(Client *c, int fullscreen);
++static void fullscreen(const Arg *arg);
+ static void setlayout(const Arg *arg);
+ static void setmfact(const Arg *arg);
+ static void setup(void);
+_AT_@ -1497,6 +1498,19 @@ setfullscreen(Client *c, int fullscreen)
+ }
+ }
+
++Layout *last_layout;
++void
++fullscreen(const Arg *arg)
++{
++ if (selmon->showbar) {
++ for(last_layout = (Layout *)layouts; last_layout != selmon->lt[selmon->sellt]; last_layout++);
++ setlayout(&((Arg) { .v = &layouts[2] }));
++ } else {
++ setlayout(&((Arg) { .v = last_layout }));
++ }
++ togglebar(arg);
++}
++
+ void
+ setlayout(const Arg *arg)
+ {
+--
+2.22.0
diff --git a/dwm.suckless.org/patches/fullscreen/index.md b/dwm.suckless.org/patches/fullscreen/index.md
new file mode 100644
index 00000000..3792c7aa
--- /dev/null
+++ b/dwm.suckless.org/patches/fullscreen/index.md
_AT_@ -0,0 +1,14 @@
+fullscreen
+==========
+
+Description
+-----------
+Applies the monocle layout with the focused client on top and hides the bar. When pressed again, shows the bar and restores the layout that was active before going fullscreen.
+
+Download
+--------
+* [dwm-fullscreen-6.2.diff](dwm-fullscreen-6.2.diff)
+
+Authors
+-------
+* Egidius Mysliwietz - <egidius [at] mysliwietz [dot] de>
Received on Mon Jul 08 2019 - 01:29:46 CEST
This archive was generated by hypermail 2.3.0
: Mon Jul 08 2019 - 01:36:29 CEST