aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
+}