diff --git a/config.def.h b/config.def.h index 7054c06..60bbe3b 100644 --- a/config.def.h +++ b/config.def.h @@ -74,6 +74,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_m, togglefullscreen,{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 0362114..53c4a26 100644 --- a/dwm.c +++ b/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 togglefullscreen(const Arg *arg); static void toggletag(const Arg *arg); static void toggleview(const Arg *arg); static void unfocus(Client *c, int setfocus); @@ -1515,6 +1516,14 @@ setfullscreen(Client *c, int fullscreen) } void +togglefullscreen(const Arg *arg) +{ + if (!selmon->sel) + return; + setfullscreen(selmon->sel, !selmon->sel->isfullscreen); +} + +void setlayout(const Arg *arg) { if (!arg || !arg->v || arg->v != selmon->lt[selmon->sellt])