From 0a07426b350e53262a5a345fe16f55e14f9bd0c5 Mon Sep 17 00:00:00 2001
From: Pavel Kirilin <win10@list.ru>
Date: Fri, 31 Jul 2020 02:46:20 +0400
Subject: [PATCH] Applied patch.

Signed-off-by: Pavel Kirilin <win10@list.ru>
---
 dwm/config.def.h | 1 +
 dwm/dwm.c        | 8 ++++++++
 2 files changed, 9 insertions(+)

diff --git a/dwm/config.def.h b/dwm/config.def.h
index b4d36d9..fd63e72 100644
--- a/dwm/config.def.h
+++ b/dwm/config.def.h
@@ -80,6 +80,7 @@ static Key keys[] = {
 	{ MODKEY,                       XK_m,      setlayout,      {.v = &layouts[2]} },
 	{ MODKEY,                       XK_space,  setlayout,      {0} },
 	{ MODKEY|ShiftMask,             XK_space,  togglefloating, {0} },
+	{ MODKEY|ShiftMask,             XK_f,      togglefullscr,  {0} },
 	{ MODKEY,                       XK_0,      view,           {.ui = ~0 } },
 	{ MODKEY|ShiftMask,             XK_0,      tag,            {.ui = ~0 } },
 	{ MODKEY,                       XK_comma,  focusmon,       {.i = -1 } },
diff --git a/dwm/dwm.c b/dwm/dwm.c
index 4465af1..c1b899a 100644
--- a/dwm/dwm.c
+++ b/dwm/dwm.c
@@ -211,6 +211,7 @@ static void tagmon(const Arg *arg);
 static void tile(Monitor *);
 static void togglebar(const Arg *arg);
 static void togglefloating(const Arg *arg);
+static void togglefullscr(const Arg *arg);
 static void toggletag(const Arg *arg);
 static void toggleview(const Arg *arg);
 static void unfocus(Client *c, int setfocus);
@@ -1719,6 +1720,13 @@ togglefloating(const Arg *arg)
 	arrange(selmon);
 }
 
+void
+togglefullscr(const Arg *arg)
+{
+  if(selmon->sel)
+    setfullscreen(selmon->sel, !selmon->sel->isfullscreen);
+}
+
 void
 toggletag(const Arg *arg)
 {
-- 
GitLab