summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.h1
-rw-r--r--dwm.c9
2 files changed, 10 insertions, 0 deletions
diff --git a/config.h b/config.h
index a23d624..a479c8b 100644
--- a/config.h
+++ b/config.h
@@ -122,6 +122,7 @@ static const Key keys[] = {
{ MODKEY, XK_a, swapfocus, {0} },
{ MODKEY|ShiftMask, XK_a, spawn, SHCMD("scrcpy") },
{ MODKEY, XK_BackSpace, swapfocus, {0} },
+ { MODKEY, XK_r, resetmfact, {0} },
#ifdef __linux__
{ MODKEY, XK_g, spawn, SHCMD(TERMINAL" -c stfloat -e watch -c -n 2 genlop -c") },
diff --git a/dwm.c b/dwm.c
index 8fb286c..466ee85 100644
--- a/dwm.c
+++ b/dwm.c
@@ -197,6 +197,7 @@ static void resizeclient(Client *c, int x, int y, int w, int h);
static void resizemouse(const Arg *arg);
static void restack(Monitor *m);
static void clientresize(const Arg *arg);
+static void resetmfact(const Arg *arg);
static void run(void);
static void scan(void);
static int sendevent(Client *c, Atom proto);
@@ -1585,6 +1586,14 @@ restack(Monitor *m)
}
void
+resetmfact(const Arg *arg)
+{
+ if (!selmon->lt[selmon->sellt]->arrange) return;
+ selmon->mfact = mfact;
+ arrange(selmon);
+}
+
+void
run(void)
{
XEvent ev;