From 61fb8628182db20d974eb63cedf41dceb7abf14c Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 21 Oct 2020 20:03:55 +0100 Subject: Removed keyhandling functionality --- config.h | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 80 insertions(+), 11 deletions(-) (limited to 'config.h') diff --git a/config.h b/config.h index 7cdf81d..dc270f9 100644 --- a/config.h +++ b/config.h @@ -39,14 +39,14 @@ static const unsigned int alphas[][3] = { /* tagging */ static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; -static const Rule rules[] = { +/*static const Rule rules[] = { /* xprop(1): * WM_CLASS(STRING) = instance, class * WM_NAME(STRING) = title */ /* class instance title tags mask isfloating monitor */ - { NULL, NULL, NULL, 0, False, -1 }, -}; +/* { NULL, NULL, NULL, 0, False, -1 }, +};*/ /* layout(s) */ static const float mfact = 0.50; /* factor of master area size [0.05..0.95] */ @@ -78,12 +78,10 @@ static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, static const char *termcmd[] = { "st", NULL }; #include "movestack.c" -static Key keys[] = { +/*static Key keys[] = { /* modifier key function argument */ - /* - { MODKEY, XK_p, spawn, {.v = dmenucmd } }, + /*{ MODKEY, XK_p, spawn, {.v = dmenucmd } }, { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, - */ { MODKEY, XK_b, togglebar, {0} }, { MODKEY, XK_j, focusstack, {.i = +1 } }, { MODKEY, XK_k, focusstack, {.i = -1 } }, @@ -98,11 +96,9 @@ static Key keys[] = { { NULL, XK_F11, togglefullscreen,{0}}, { MODKEY, XK_Tab, view, {0} }, { MODKEY, XK_q, killclient, {0} }, - /* { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, - */ { MODKEY|ControlMask, XK_comma, cyclelayout, {.i = -1 } }, { MODKEY|ControlMask, XK_period, cyclelayout, {.i = +1 } }, { MODKEY, XK_space, setlayout, {0} }, @@ -123,8 +119,7 @@ static Key keys[] = { TAGKEYS( XK_8, 7) TAGKEYS( XK_9, 8) { MODKEY|ShiftMask, XK_q, quit, {0} }, - -}; +};/* /* button definitions */ /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ @@ -142,3 +137,77 @@ static Button buttons[] = { { ClkTagBar, MODKEY, Button1, tag, {0} }, { 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 - 1)})); +} + +void +viewall(const Arg *arg) +{ + view(&((Arg){.ui = ~0})); +} + +void +toggleviewex(const Arg *arg) +{ + toggleview(&((Arg) { .ui = 1 << (arg->ui - 1)})); +} + +void +tagex(const Arg *arg) +{ + tag(&((Arg) { .ui = 1 << (arg->ui - 1)})); +} + +void +toggletagex(const Arg *arg) +{ + toggletag(&((Arg) { .ui = 1 << (arg->ui - 1)})); +} + +void +tagall(const Arg *arg) +{ + tag(&((Arg){.ui = ~0})); +} + +/* signal definitions */ +/* signum must be greater than 0 */ +/* trigger signals using `xsetroot -name "fsignal: [ ]"` */ +static Signal signals[] = { + /* signum function */ + { "focusstack", focusstack }, + { "movestack", movestack }, + { "setmfact", setmfact }, + { "togglebar", togglebar }, + { "incnmaster", incnmaster }, + { "togglefloating", togglefloating }, + { "togglefullscreen", togglefullscreen }, + { "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 }, + { "cyclelayout", cyclelayout }, +}; -- cgit 1.4.1