diff --git a/config.def.h b/config.def.h index d32cba2..9ace6b6 100644 --- a/config.def.h +++ b/config.def.h @@ -104,6 +104,7 @@ static Key keys[] = { TAGKEYS( XK_8, 7) TAGKEYS( XK_9, 8) { MODKEY|ShiftMask, XK_q, quit, {0} }, + { MODKEY, XK_F11, togglefakefullscreen, {0} }, }; /* button definitions */ diff --git a/config.h b/config.h index bcbbc34..d3840a1 100644 --- a/config.h +++ b/config.h @@ -107,6 +107,7 @@ static Key keys[] = { TAGKEYS( XK_8, 7) TAGKEYS( XK_9, 8) { MODKEY|ShiftMask, XK_q, quit, {0} }, + { MODKEY, XK_F11, togglefakefullscreen, {0} }, }; /* button definitions */ diff --git a/dwm.c b/dwm.c index 19fb200..77d17f5 100644 --- a/dwm.c +++ b/dwm.c @@ -242,6 +242,7 @@ static void tag(const Arg *arg); static void tagmon(const Arg *arg); static void tile(Monitor *); static void togglebar(const Arg *arg); +static void togglefakefullscreen(const Arg *arg); static void togglefloating(const Arg *arg); static void toggletag(const Arg *arg); static void toggleview(const Arg *arg); @@ -1947,6 +1948,16 @@ togglebar(const Arg *arg) arrange(selmon); } +void +togglefakefullscreen(const Arg *arg) +{ + if (!selmon->sel) + return; + selmon->sel->isfakefullscreen = !selmon->sel->isfakefullscreen; + selmon->sel->isfloating = False; + arrange(selmon); +} + void togglefloating(const Arg *arg) {