dwm

personal fork of dwm (rnpnr branch)
git clone anongit@rnpnr.xyz:dwm.git
Log | Files | Refs | Feed | README | LICENSE

Commit: d8318f790cc5b21c2bb8830d1e04e3dc4d02fac7
Parent: 95e34c5ac3ef0fa670275cc23c4a38b79ff4ac65
Author: Randy Palamar
Date:   Sat, 13 Feb 2021 23:07:15 -0700

add a command/keybind to fullscreen any window

Diffstat:
Mconfig.def.h | 3++-
Mdwm.c | 14+++++++++++---
2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/config.def.h b/config.def.h @@ -77,11 +77,12 @@ static const Key keys[] = { { MODKEY, XK_Tab, view, {0} }, { MODKEY|ShiftMask, XK_c, killclient, {0} }, { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, - { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, + { MODKEY|ShiftMask, XK_f, setlayout, {.v = &layouts[1]} }, { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, { MODKEY, XK_space, setlayout, {0} }, { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, { MODKEY|ShiftMask, XK_y, togglefakefull, {0} }, + { MODKEY, XK_f, togglefullscr, {0} }, { MODKEY, XK_0, view, {.ui = ~0 } }, { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, { MODKEY, XK_comma, focusmon, {.i = -1 } }, diff --git a/dwm.c b/dwm.c @@ -187,7 +187,6 @@ static Client *nexttiled(Client *c); static void pop(Client *c); static void propertynotify(XEvent *e); static void quit(const Arg *arg); -static void togglefakefull(const Arg *arg); static Monitor *recttomon(int x, int y, int w, int h); static void resize(Client *c, int x, int y, int w, int h, int interact); static void resizeclient(Client *c, int x, int y, int w, int h); @@ -210,7 +209,9 @@ static void tag(const Arg *arg); static void tagmon(const Arg *arg); static void tile(Monitor *m); static void togglebar(const Arg *arg); +static void togglefakefull(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); @@ -1731,6 +1732,12 @@ togglebar(const Arg *arg) } void +togglefakefull(const Arg *arg) +{ + fakefullscreen = !fakefullscreen; +} + +void togglefloating(const Arg *arg) { if (!selmon->sel) @@ -1745,9 +1752,10 @@ togglefloating(const Arg *arg) } void -togglefakefull(const Arg *arg) +togglefullscr(const Arg *arg) { - fakefullscreen = !fakefullscreen; + if (selmon->sel) + setfullscreen(selmon->sel, !selmon->sel->isfullscreen); } void