Add togglefullscreen function - dwm - my version of dwm (frankenstein's monster)
 (HTM) git clone https://git.drkhsh.at/dwm.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit cabc9c7889a3b8c2e4262375321263d555570f74
 (DIR) parent 144c3b279e6031ac0c46e3963e02a4175d55984e
 (HTM) Author: drkhsh <me@drkhsh.at>
       Date:   Mon, 10 Jan 2022 13:52:51 +0100
       
       Add togglefullscreen function
       
       Allows you to toggle fullscreen on and off using the same shortcut key
       
       Diffstat:
         M config.def.h                        |       1 +
         M dwm.c                               |       9 +++++++++
       
       2 files changed, 10 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/config.def.h b/config.def.h
       @@ -143,6 +143,7 @@ static const Key keys[] = {
                { MODKEY,                       XK_m,      setlayout,      {.v = &layouts[2]} },
                { MODKEY,                       XK_space,  setlayout,      {0} },
                { MODKEY|ShiftMask,             XK_space,  togglefloating, {0} },
       +        { MODKEY,                       XK_y,      togglefullscreen, {0} },
                { MODKEY,                       XK_0,      view,           {.ui = ~0 } },
                { MODKEY|ShiftMask,             XK_0,      tag,            {.ui = ~0 } },
                { MODKEY,                       XK_comma,  focusmon,       {.i = -1 } },
 (DIR) diff --git a/dwm.c b/dwm.c
       @@ -269,6 +269,7 @@ static void tag(const Arg *arg);
        static void tagmon(const Arg *arg);
        static void togglebar(const Arg *arg);
        static void togglefloating(const Arg *arg);
       +static void togglefullscreen(const Arg *arg);
        static void toggletag(const Arg *arg);
        static void toggleview(const Arg *arg);
        static void unfocus(Client *c, int setfocus);
       @@ -2198,6 +2199,14 @@ togglefloating(const Arg *arg)
        }
        
        void
       +togglefullscreen(const Arg *arg) {
       +    if (!selmon->sel)
       +        return;
       +
       +    setfullscreen(selmon->sel, !selmon->sel->isfullscreen);
       +}
       +
       +void
        toggletag(const Arg *arg)
        {
                unsigned int newtags;