dwm

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

Commit: 0d2157033b2f325819597881437b48da4895cbec
Parent: a8bfc3525b1f521507a432ee53f14360e05a9140
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 @@ -188,7 +188,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); @@ -211,7 +210,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); @@ -1732,6 +1733,12 @@ togglebar(const Arg *arg) } void +togglefakefull(const Arg *arg) +{ + fakefullscreen = !fakefullscreen; +} + +void togglefloating(const Arg *arg) { if (!selmon->sel) @@ -1746,9 +1753,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