summaryrefslogtreecommitdiff
path: root/config.def.h
diff options
context:
space:
mode:
authorChris Sobczak <chris@sobczak.family>2026-07-03 01:39:26 -0700
committerChris Sobczak <chris@sobczak.family>2026-07-03 01:39:26 -0700
commit578f96453e3d94733b4c3b4590f7c714ff13233c (patch)
tree1a1f4f7f5e19edf989573f309e25bbc6ec07b482 /config.def.h
parentc535e010a8f3936516a02efcf784eed6b7f64647 (diff)
formatting
Diffstat (limited to 'config.def.h')
-rw-r--r--config.def.h126
1 files changed, 61 insertions, 65 deletions
diff --git a/config.def.h b/config.def.h
index 45d7d52..cf6705e 100644
--- a/config.def.h
+++ b/config.def.h
@@ -40,10 +40,6 @@ static int log_level = WLR_ERROR;
static const Rule rules[] = {
/* app_id title tags mask isfloating monitor */
-// { "Gimp_EXAMPLE", NULL, 0, 1, -1 }, /* Start on currently visible tags floating, not tiled */
-// { "firefox_EXAMPLE", NULL, 1 << 8, 0, -1 }, /* Start on ONLY tag "9" */
-// { "Gimp_EXAMPLE", NULL, 0, 1, 1.00, 0.20, -1 }, /* Start on currently visible tags floating, not tiled */
-// { "firefox_EXAMPLE", NULL, 1 << 8, 0, 1.00, 1.00, -1 }, /* Start on ONLY tag "9" */
/* app_id title tags mask isfloating alpha focus alpha unfocus monitor */
{ "Gimp", NULL, 0, 1, default_opacity_focus, default_opacity_unfocus, -1 },
{ "mpv", NULL, 0, 1, 1, 1, -1 },
@@ -55,10 +51,10 @@ static const Rule rules[] = {
/* layout(s) */
static const Layout layouts[] = {
- /* symbol arrange function */
- { "[]=", tile },
- { "><>", NULL }, /* no layout function means floating behavior */
- { "[M]", monocle },
+ /* symbol arrange function */
+ { "[]=", tile },
+ { "><>", NULL }, /* no layout function means floating behavior */
+ { "[M]", monocle },
};
/* monitors */
@@ -66,10 +62,10 @@ static const Layout layouts[] = {
* WARNING: negative values other than (-1, -1) cause problems with Xwayland clients due to
* https://gitlab.freedesktop.org/xorg/xserver/-/issues/899 */
static const MonitorRule monrules[] = {
- /* name mfact nmaster scale layout rotate/reflect x y
+ /* name mfact nmaster scale layout rotate/reflect x y
* example of a HiDPI laptop monitor:
{ "eDP-1", 0.5f, 1, 2, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 }, */
- { NULL, 0.55f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
+ { NULL, 0.55f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
/* default monitor rule: can be changed but cannot be eliminated; at least one monitor rule must exist */
};
@@ -77,8 +73,7 @@ static const MonitorRule monrules[] = {
static const struct xkb_rule_names xkb_rules = {
/* can specify fields: rules, model, layout, variant, options */
/* example:
- .options = "ctrl:nocaps",
- */
+ .options = "ctrl:nocaps", */
// set capslock to escape
// maybe can repurpose windows key here too ...
.options = "caps:escape",
@@ -166,61 +161,62 @@ static const char *radarcmd[] = { "radar", NULL };
static const Key keys[] = {
/* Note that Shift changes certain key codes: 2 -> at, etc. */
- /* modifier key function argument */
- // commands
- { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_p, spawn, {.v = passcmd } },
- { MODKEY, XKB_KEY_o, spawn, {.v = otpcmd } },
- { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_A, spawn, {.v = webcmd } },
- { MODKEY, XKB_KEY_r, spawn, {.v = radarcmd } },
- // basic functionality
- { MODKEY, XKB_KEY_p, spawn, {.v = menucmd} },
- { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, spawn, {.v = termcmd} },
- { MODKEY, XKB_KEY_b, togglebar, {0} },
- { MODKEY, XKB_KEY_j, focusstack, {.i = +1} },
- { MODKEY, XKB_KEY_k, focusstack, {.i = -1} },
- { MODKEY, XKB_KEY_i, incnmaster, {.i = +1} },
- { MODKEY, XKB_KEY_d, incnmaster, {.i = -1} },
- { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_j, movestack, {.i = +1} },
- { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_k, movestack, {.i = -1} },
- { MODKEY, XKB_KEY_h, setmfact, {.f = -0.05f} },
- { MODKEY, XKB_KEY_l, setmfact, {.f = +0.05f} },
- { MODKEY, XKB_KEY_Return, zoom, {0} },
- { MODKEY, XKB_KEY_Tab, view, {0} },
- // shiftview
- { MODKEY, XKB_KEY_q, shiftview, { .i = -1 } },
- { MODKEY, XKB_KEY_w, shiftview, { .i = 1 } },
- { MODKEY, XKB_KEY_g, togglegaps, {0} },
- { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_C, killclient, {0} },
- { MODKEY, XKB_KEY_t, setlayout, {.v = &layouts[0]} },
- { MODKEY, XKB_KEY_f, setlayout, {.v = &layouts[1]} },
- { MODKEY, XKB_KEY_m, setlayout, {.v = &layouts[2]} },
- { MODKEY, XKB_KEY_space, setlayout, {0} },
- { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_space, togglefloating, {0} },
- { MODKEY, XKB_KEY_e, togglefullscreen, {0} },
- { MODKEY, XKB_KEY_0, view, {.ui = ~0} },
- { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_parenright, tag, {.ui = ~0} },
- { MODKEY, XKB_KEY_comma, focusmon, {.i = WLR_DIRECTION_LEFT} },
- { MODKEY, XKB_KEY_period, focusmon, {.i = WLR_DIRECTION_RIGHT} },
- { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_less, tagmon, {.i = WLR_DIRECTION_LEFT} },
- { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_greater, tagmon, {.i = WLR_DIRECTION_RIGHT} },
- // From client-opacity-focus patch
- { MODKEY|WLR_MODIFIER_CTRL, XKB_KEY_k, setopacityunfocus, {.f = +0.1f} },
- { MODKEY|WLR_MODIFIER_CTRL, XKB_KEY_j, setopacityunfocus, {.f = -0.1f} },
- { MODKEY|WLR_MODIFIER_CTRL|WLR_MODIFIER_SHIFT, XKB_KEY_K, setopacityfocus, {.f = +0.1f} },
- { MODKEY|WLR_MODIFIER_CTRL|WLR_MODIFIER_SHIFT, XKB_KEY_J, setopacityfocus, {.f = -0.1f} },
- TAGKEYS( XKB_KEY_1, XKB_KEY_exclam, 0),
- TAGKEYS( XKB_KEY_2, XKB_KEY_at, 1),
- TAGKEYS( XKB_KEY_3, XKB_KEY_numbersign, 2),
- TAGKEYS( XKB_KEY_4, XKB_KEY_dollar, 3),
- TAGKEYS( XKB_KEY_5, XKB_KEY_percent, 4),
-// TAGKEYS( XKB_KEY_6, XKB_KEY_asciicircum, 5),
-// TAGKEYS( XKB_KEY_7, XKB_KEY_ampersand, 6),
-// TAGKEYS( XKB_KEY_8, XKB_KEY_asterisk, 7),
-// TAGKEYS( XKB_KEY_9, XKB_KEY_parenleft, 8),
- { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Q, quit, {0} },
+ /* modifier key function argument */
+// command launchers
+ { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_p, spawn, {.v = passcmd } },
+ { MODKEY, XKB_KEY_o, spawn, {.v = otpcmd } },
+ { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_A, spawn, {.v = webcmd } },
+ { MODKEY, XKB_KEY_r, spawn, {.v = radarcmd } },
+// basic functionality
+ { MODKEY, XKB_KEY_p, spawn, {.v = menucmd} },
+ { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, spawn, {.v = termcmd} },
+ { MODKEY, XKB_KEY_b, togglebar, {0} },
+ { MODKEY, XKB_KEY_j, focusstack, {.i = +1} },
+ { MODKEY, XKB_KEY_k, focusstack, {.i = -1} },
+ { MODKEY, XKB_KEY_i, incnmaster, {.i = +1} },
+ { MODKEY, XKB_KEY_d, incnmaster, {.i = -1} },
+ { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_j, movestack, {.i = +1} },
+ { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_k, movestack, {.i = -1} },
+ { MODKEY, XKB_KEY_h, setmfact, {.f = -0.05f} },
+ { MODKEY, XKB_KEY_l, setmfact, {.f = +0.05f} },
+ { MODKEY, XKB_KEY_Return, zoom, {0} }, // not sure what this does
+ { MODKEY, XKB_KEY_Tab, view, {0} },
+// shiftview
+ { MODKEY, XKB_KEY_q, shiftview, { .i = -1 } },
+ { MODKEY, XKB_KEY_w, shiftview, { .i = 1 } },
+// gaps
+ { MODKEY, XKB_KEY_g, togglegaps, {0} },
+ { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_C, killclient, {0} },
+ { MODKEY, XKB_KEY_t, setlayout, {.v = &layouts[0]} },
+// { MODKEY, XKB_KEY_f, setlayout, {.v = &layouts[1]} }, // I never use this so disabling
+ { MODKEY, XKB_KEY_m, setlayout, {.v = &layouts[2]} },
+ { MODKEY, XKB_KEY_space, setlayout, {0} },
+ { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_space, togglefloating, {0} },
+// { MODKEY, XKB_KEY_e, togglefullscreen, {0} }, // instead of this I use combination of monocle, gaps, bar
+ { MODKEY, XKB_KEY_0, view, {.ui = ~0} },
+ { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_parenright, tag, {.ui = ~0} },
+ { MODKEY, XKB_KEY_comma, focusmon, {.i = WLR_DIRECTION_LEFT} },
+ { MODKEY, XKB_KEY_period, focusmon, {.i = WLR_DIRECTION_RIGHT} },
+ { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_less, tagmon, {.i = WLR_DIRECTION_LEFT} },
+ { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_greater, tagmon, {.i = WLR_DIRECTION_RIGHT} },
+// From client-opacity-focus patch
+ { MODKEY|WLR_MODIFIER_CTRL, XKB_KEY_k, setopacityunfocus, {.f = +0.1f} },
+ { MODKEY|WLR_MODIFIER_CTRL, XKB_KEY_j, setopacityunfocus, {.f = -0.1f} },
+ { MODKEY|WLR_MODIFIER_CTRL|WLR_MODIFIER_SHIFT, XKB_KEY_K, setopacityfocus, {.f = +0.1f} },
+ { MODKEY|WLR_MODIFIER_CTRL|WLR_MODIFIER_SHIFT, XKB_KEY_J, setopacityfocus, {.f = -0.1f} },
+ TAGKEYS( XKB_KEY_1, XKB_KEY_exclam, 0 ),
+ TAGKEYS( XKB_KEY_2, XKB_KEY_at, 1 ),
+ TAGKEYS( XKB_KEY_3, XKB_KEY_numbersign, 2 ),
+ TAGKEYS( XKB_KEY_4, XKB_KEY_dollar, 3 ),
+ TAGKEYS( XKB_KEY_5, XKB_KEY_percent, 4 ),
+// TAGKEYS( XKB_KEY_6, XKB_KEY_asciicircum, 5 ),
+// TAGKEYS( XKB_KEY_7, XKB_KEY_ampersand, 6 ),
+// TAGKEYS( XKB_KEY_8, XKB_KEY_asterisk, 7 ),
+// TAGKEYS( XKB_KEY_9, XKB_KEY_parenleft, 8 ),
+ { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Q, quit, {0} },
/* Ctrl-Alt-Backspace and Ctrl-Alt-Fx used to be handled by X server */
- { WLR_MODIFIER_CTRL|WLR_MODIFIER_ALT,XKB_KEY_Terminate_Server, quit, {0} },
+ { WLR_MODIFIER_CTRL|WLR_MODIFIER_ALT,XKB_KEY_Terminate_Server, quit, {0} },
/* Ctrl-Alt-Fx is used to switch to another VT, if you don't know what a VT is
* do not remove them.
*/