fixed keybindings added scratchpads

This commit is contained in:
mrsu 2024-06-14 14:00:12 +01:00
parent 938357a3d3
commit 6824910c69
1 changed files with 35 additions and 28 deletions

View File

@ -6,6 +6,7 @@
static unsigned int borderpx = 6; /* border pixel of windows */ static unsigned int borderpx = 6; /* border pixel of windows */
static const unsigned int gappx = 10; /* gaps between windows */ static const unsigned int gappx = 10; /* gaps between windows */
static unsigned int snap = 32; /* snap pixel */ static unsigned int snap = 32; /* snap pixel */
static const int swallowfloating = 0; /* 1 means swallow floating windows by default */
static int showbar = 1; /* 0 means no bar */ static int showbar = 1; /* 0 means no bar */
static int topbar = 1; /* 0 means bottom bar */ static int topbar = 1; /* 0 means bottom bar */
static const char font[] = "monospace:size=14"; static const char font[] = "monospace:size=14";
@ -65,18 +66,17 @@ static Sp scratchpads[] = {
/* tagging */ /* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; 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 */ /* class instance title tags mask isfloating monitor */
{ "Gimp", NULL, NULL, 0, 1, -1 }, { NULL, "spterm0", NULL, SPTAG(0), 1, -1 },
{ "Firefox", NULL, NULL, 1 << 8, 0, -1 }, { NULL, "spterm1", NULL, SPTAG(1), 1, -1 },
{ NULL, "spterm", NULL, SPTAG(0), 1, -1 }, { NULL, "spterm2", NULL, SPTAG(2), 1, -1 },
{ NULL, "spfm", NULL, SPTAG(1), 1, -1 }, { NULL, "spterm3", NULL, SPTAG(3), 1, -1 },
{ NULL, "keepassxc", NULL, SPTAG(2), 0, -1 }, { NULL, "spterm4", NULL, SPTAG(4), 1, -1 },
{ NULL, "spterm5", NULL, SPTAG(5), 1, -1 },
{ NULL, "spterm6", NULL, SPTAG(6), 1, -1 },
}; };
/* layout(s) */ /* layout(s) */
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
static const int nmaster = 1; /* number of clients in master area */ static const int nmaster = 1; /* number of clients in master area */
@ -103,20 +103,22 @@ static const Layout layouts[] = {
/* commands */ /* commands */
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_base01, "-nf", col_base04, "-sb", col_base0D, "-sf", col_base00, NULL }; static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_base01, "-nf", col_base04, "-sb", col_base0D, "-sf", col_base00, NULL };
static const char *dmenuwifi[] = { "dmenu-wifi.sh", NULL };
static const char *termcmd[] = { "st", NULL }; static const char *termcmd[] = { "st", NULL };
static const Key keys[] = { static const Key keys[] = {
/* modifier key function argument */ /* modifier key function argument */
{ MODKEY, XK_r, spawn, {.v = dmenucmd } }, { MODKEY, XK_r, spawn, {.v = dmenucmd } },
{ MODKEY, XK_w, spawn, {.v = dmenuwifi } },
{ MODKEY, XK_Return, spawn, {.v = termcmd } }, { MODKEY, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_b, togglebar, {0} }, { MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } }, { MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } }, { MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY, XK_i, incnmaster, {.i = +1 } }, { MODKEY|ShiftMask, XK_i, incnmaster, {.i = +1 } },
{ MODKEY, XK_d, incnmaster, {.i = -1 } }, { MODKEY|ShiftMask, XK_d, incnmaster, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f = -0.05} }, { MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} }, { MODKEY, XK_l, setmfact, {.f = +0.05} },
{ MODKEY, XK_Return, zoom, {0} }, { MODKEY|ShiftMask, XK_Return, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} }, { MODKEY, XK_Tab, view, {0} },
{ MODKEY, XK_q, killclient, {0} }, { MODKEY, XK_q, killclient, {0} },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
@ -143,9 +145,15 @@ static const Key keys[] = {
TAGKEYS( XK_9, 8) TAGKEYS( XK_9, 8)
{ MODKEY|ShiftMask, XK_q, quit, {0} }, { MODKEY|ShiftMask, XK_q, quit, {0} },
{ MODKEY|ControlMask|ShiftMask, XK_q, quit, {1} }, { MODKEY|ControlMask|ShiftMask, XK_q, quit, {1} },
// Scratchpads
{ MODKEY, XK_y, togglescratch, {.ui = 0 } }, { MODKEY, XK_y, togglescratch, {.ui = 0 } },
{ MODKEY, XK_u, togglescratch, {.ui = 1 } }, { MODKEY, XK_u, togglescratch, {.ui = 1 } },
{ MODKEY, XK_x, togglescratch, {.ui = 2 } }, { MODKEY, XK_i, togglescratch, {.ui = 2 } },
{ MODKEY, XK_c, togglescratch, {.ui = 3 } },
{ MODKEY|ShiftMask, XK_c, togglescratch, {.ui = 4 } },
{ MODKEY, XK_a, togglescratch, {.ui = 5 } },
{ MODKEY, XK_p, togglescratch, {.ui = 6 } },
{ MODKEY, XK_o, togglescratch, {.ui = -1 } }, { MODKEY, XK_o, togglescratch, {.ui = -1 } },
}; };
@ -163,5 +171,4 @@ static const Button buttons[] = {
{ ClkTagBar, 0, Button1, view, {0} }, { ClkTagBar, 0, Button1, view, {0} },
{ ClkTagBar, 0, Button3, toggleview, {0} }, { ClkTagBar, 0, Button3, toggleview, {0} },
{ ClkTagBar, MODKEY, Button1, tag, {0} }, { ClkTagBar, MODKEY, Button1, tag, {0} },
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
}; };