summaryrefslogtreecommitdiff
path: root/config.def.h
diff options
context:
space:
mode:
Diffstat (limited to 'config.def.h')
-rw-r--r--config.def.h141
1 files changed, 84 insertions, 57 deletions
diff --git a/config.def.h b/config.def.h
index 7f7eb4e..f011ad1 100644
--- a/config.def.h
+++ b/config.def.h
@@ -96,64 +96,8 @@ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn()
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
static const char *termcmd[] = { "st", NULL };
-static const Key keys[] = {
+static const Key keys[] = { /* All other keys have migrated to sxhkd */
/* modifier key function argument */
- { MODKEY, XK_p, spawn, {.v = dmenucmd } },
- { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
- { MODKEY, XK_b, togglebar, {0} },
- { MODKEY|ShiftMask, XK_j, rotatestack, {.i = +1 } },
- { MODKEY|ShiftMask, XK_k, rotatestack, {.i = -1 } },
- { MODKEY, XK_j, focusstack, {.i = +1 } },
- { MODKEY, XK_k, focusstack, {.i = -1 } },
- { MODKEY, XK_i, incnmaster, {.i = +1 } },
- { MODKEY, XK_d, incnmaster, {.i = -1 } },
- { MODKEY, XK_h, setmfact, {.f = -0.05} },
- { MODKEY, XK_l, setmfact, {.f = +0.05} },
- { MODKEY|ShiftMask, XK_b, setcfact, {.f = +0.25} },
- { MODKEY|ShiftMask, XK_m, setcfact, {.f = -0.25} },
- { MODKEY|ShiftMask, XK_n, setcfact, {.f = 0.00} },
- { MODKEY|ShiftMask, XK_l, movestack, {.i = +1 } },
- { MODKEY|ShiftMask, XK_h, movestack, {.i = -1 } },
- { MODKEY, XK_Return, zoom, {0} },
- { MODKEY|Mod4Mask, XK_u, incrgaps, {.i = +1 } },
- { MODKEY|Mod4Mask|ShiftMask, XK_u, incrgaps, {.i = -1 } },
- { MODKEY|Mod4Mask, XK_i, incrigaps, {.i = +1 } },
- { MODKEY|Mod4Mask|ShiftMask, XK_i, incrigaps, {.i = -1 } },
- { MODKEY|Mod4Mask, XK_o, incrogaps, {.i = +1 } },
- { MODKEY|Mod4Mask|ShiftMask, XK_o, incrogaps, {.i = -1 } },
- { MODKEY|Mod4Mask, XK_6, incrihgaps, {.i = +1 } },
- { MODKEY|Mod4Mask|ShiftMask, XK_6, incrihgaps, {.i = -1 } },
- { MODKEY|Mod4Mask, XK_7, incrivgaps, {.i = +1 } },
- { MODKEY|Mod4Mask|ShiftMask, XK_7, incrivgaps, {.i = -1 } },
- { MODKEY|Mod4Mask, XK_8, incrohgaps, {.i = +1 } },
- { MODKEY|Mod4Mask|ShiftMask, XK_8, incrohgaps, {.i = -1 } },
- { MODKEY|Mod4Mask, XK_9, incrovgaps, {.i = +1 } },
- { MODKEY|Mod4Mask|ShiftMask, XK_9, incrovgaps, {.i = -1 } },
- { MODKEY|Mod4Mask, XK_0, togglegaps, {0} },
- { MODKEY|Mod4Mask|ShiftMask, XK_0, defaultgaps, {0} },
- { 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, XK_m, setlayout, {.v = &layouts[2]} },
- { MODKEY, XK_w, setlayout, {.v = &layouts[3]} },
- { MODKEY, XK_space, setlayout, {0} },
- { MODKEY|ShiftMask, XK_space, togglefloating, {0} },
- { MODKEY, XK_0, view, {.ui = ~0 } },
- { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
- { MODKEY, XK_comma, focusmon, {.i = -1 } },
- { MODKEY, XK_period, focusmon, {.i = +1 } },
- { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
- { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
- TAGKEYS( XK_1, 0)
- TAGKEYS( XK_2, 1)
- TAGKEYS( XK_3, 2)
- TAGKEYS( XK_4, 3)
- TAGKEYS( XK_5, 4)
- TAGKEYS( XK_6, 5)
- TAGKEYS( XK_7, 6)
- TAGKEYS( XK_8, 7)
- TAGKEYS( XK_9, 8)
{ MODKEY|ShiftMask, XK_q, quit, {0} },
};
@@ -176,3 +120,86 @@ static const Button buttons[] = {
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
};
+void
+setlayoutex(const Arg *arg)
+{
+ setlayout(&((Arg) { .v = &layouts[arg->i] }));
+}
+
+void
+viewex(const Arg *arg)
+{
+ view(&((Arg) { .ui = 1 << arg->ui }));
+}
+
+void
+viewall(const Arg *arg)
+{
+ view(&((Arg){.ui = ~0}));
+}
+
+void
+toggleviewex(const Arg *arg)
+{
+ toggleview(&((Arg) { .ui = 1 << arg->ui }));
+}
+
+void
+tagex(const Arg *arg)
+{
+ tag(&((Arg) { .ui = 1 << arg->ui }));
+}
+
+void
+toggletagex(const Arg *arg)
+{
+ toggletag(&((Arg) { .ui = 1 << arg->ui }));
+}
+
+void
+tagall(const Arg *arg)
+{
+ tag(&((Arg){.ui = ~0}));
+}
+
+/* signal definitions */
+/* signum must be greater than 0 */
+/* trigger signals using `xsetroot -name "fsignal:<signame> [<type> <value>]"` */
+static Signal signals[] = {
+ /* signum function */
+ { "focusstack", focusstack },
+ { "setmfact", setmfact },
+ { "togglebar", togglebar },
+ { "incnmaster", incnmaster },
+ { "togglefloating", togglefloating },
+ { "focusmon", focusmon },
+ { "tagmon", tagmon },
+ { "zoom", zoom },
+ { "view", view },
+ { "viewall", viewall },
+ { "viewex", viewex },
+ { "toggleview", view },
+ { "toggleviewex", toggleviewex },
+ { "tag", tag },
+ { "tagall", tagall },
+ { "tagex", tagex },
+ { "toggletag", tag },
+ { "toggletagex", toggletagex },
+ { "killclient", killclient },
+ { "quit", quit },
+ { "setlayout", setlayout },
+ { "setlayoutex", setlayoutex },
+ { "rotatestack", rotatestack },
+ { "setcfact", setcfact },
+ { "movestack", movestack },
+ { "incrgaps", incrgaps },
+ { "incrigaps", incrigaps },
+ { "incrogaps", incrogaps },
+ { "incrihgaps", incrihgaps },
+ { "incrivgaps", incrivgaps },
+ { "incrohgaps", incrohgaps },
+ { "incrovgaps", incrovgaps },
+ { "togglegaps", togglegaps },
+ { "defaultgaps", defaultgaps },
+ { "sigstatusbar", sigstatusbar },
+};