aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2021-09-10 20:30:29 -0400
committerMitchell Riedstra <mitch@riedstra.dev>2021-09-10 20:30:29 -0400
commit27ce2cea129d95926cfc7676e37f48e2cf388aa2 (patch)
tree8db079565dcc33585bba3b3586b3eff67b3b4f76
parent703cf5fcb0071d97af607f33dcae545bbfca710e (diff)
downloaddwm-27ce2cea129d95926cfc7676e37f48e2cf388aa2.tar.gz
dwm-27ce2cea129d95926cfc7676e37f48e2cf388aa2.tar.xz
Add in a fullscreen toggle hotkey to super+alt+f
-rw-r--r--config.h2
-rw-r--r--dwm.c8
2 files changed, 10 insertions, 0 deletions
diff --git a/config.h b/config.h
index 04cb63f..12cb037 100644
--- a/config.h
+++ b/config.h
@@ -119,6 +119,8 @@ static Key keys[] = {
{ MODKEY|ShiftMask, XK_f, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY|ShiftMask, XK_q, killclient, {0} },
+ /* This makes it impossible to switch to alt globally, oh well */
+ { MODKEY|Mod1Mask, XK_f, togglefullscr, {0} },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
diff --git a/dwm.c b/dwm.c
index 2e75b3a..cb4113f 100644
--- a/dwm.c
+++ b/dwm.c
@@ -212,6 +212,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);
@@ -2255,3 +2256,10 @@ centeredfloatingmaster(Monitor *m)
tx += WIDTH(c);
}
}
+
+void
+togglefullscr(const Arg *arg)
+{
+ if(selmon->sel)
+ setfullscreen(selmon->sel, !selmon->sel->isfullscreen);
+}