summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.h1
-rw-r--r--dwm.c8
2 files changed, 9 insertions, 0 deletions
diff --git a/config.h b/config.h
index c8fe97d..868c974 100644
--- a/config.h
+++ b/config.h
@@ -78,6 +78,7 @@ static Key keys[] = {
{ MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
{ MODKEY, XK_p, incnmaster, {.i = -1 } },
+ { MODKEY, XK_o, setnmaster, {.i = 1} },
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
{ MODKEY, XK_Return, zoom, {0} },
diff --git a/dwm.c b/dwm.c
index 1bbce1d..2c77adb 100644
--- a/dwm.c
+++ b/dwm.c
@@ -202,6 +202,7 @@ static int gettextprop(Window w, Atom atom, char *text, unsigned int size);
static void grabbuttons(Client *c, int focused);
static void grabkeys(void);
static void incnmaster(const Arg *arg);
+static void setnmaster(const Arg *arg);
static void keypress(XEvent *e);
static void killclient(const Arg *arg);
static void manage(Window w, XWindowAttributes *wa);
@@ -1096,6 +1097,13 @@ incnmaster(const Arg *arg)
arrange(selmon);
}
+//THis is custom
+void
+setnmaster(const Arg *arg){
+ selmon->nmaster = arg->i;
+ arrange(selmon);
+}
+
#ifdef XINERAMA
static int
isuniquegeom(XineramaScreenInfo *unique, size_t n, XineramaScreenInfo *info)