diff options
| author | nic <ra@afu.re> | 2025-08-02 17:24:07 -0400 |
|---|---|---|
| committer | nic <ra@afu.re> | 2025-08-02 17:24:07 -0400 |
| commit | fa8cca53c3462ea94e151e0b61a6428c8757a8dc (patch) | |
| tree | 253dade8f0091f9df21a1b622d69dd4f48cca30a | |
| parent | 9870fdef2ab67089ede2736f1ed9cb0c5480fe21 (diff) | |
Keybidings ...
| -rw-r--r-- | config.def.h | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/config.def.h b/config.def.h index 978d2a9..3d1b48a 100644 --- a/config.def.h +++ b/config.def.h @@ -1,3 +1,4 @@ +#define TERMINAL "foot" /* Taken from https://github.com/djpohly/dwl/issues/466 */ #define COLOR(hex) { ((hex >> 24) & 0xFF) / 255.0f, \ ((hex >> 16) & 0xFF) / 255.0f, \ @@ -131,13 +132,25 @@ static const int cursor_timeout = 5; /* commands */ static const char *termcmd[] = { "foot", NULL }; -static const char *menucmd[] = { "wmenu-run", NULL }; +static const char *menucmd[] = { "bemenu-run", NULL }; static const Key keys[] = { /* Note that Shift changes certain key codes: c -> C, 2 -> at, etc. */ + + /* SEPARE SPAWN FROM OTHER FUNCTION + LAYOUT FUNCTION */ + /* modifier key function argument */ - { MODKEY, XKB_KEY_a, spawn, {.v = menucmd} }, { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, spawn, {.v = termcmd} }, + { MODKEY, XKB_KEY_a, spawn, {.v = menucmd} }, + { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_A, spawn, SHCMD(TERMINAL " -e abook -C ~/.config/abook/abookrc --datafile ~/.config/abook/addressbook") }, + { MODKEY, XKB_KEY_w, spawn, {.v = (const char*[]){ "firefox", NULL }} }, + { MODKEY, XKB_KEY_t, spawn, {.v = (const char*[]){ TERMINAL, "-e", "htop", NULL }} }, + { MODKEY, XKB_KEY_n, spawn, SHCMD(TERMINAL "-e nvim -c VimwikiIndex") }, + { MODKEY, XKB_KEY_m, spawn, SHCMD(TERMINAL " -e neomutt ") }, + { MODKEY, XKB_KEY_q, killclient, {0} }, + { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Q, spawn, {.v = (const char*[]){ "sysact", NULL }} }, + + { MODKEY, XKB_KEY_b, togglebar, {0} }, { MODKEY, XKB_KEY_j, focusstack, {.i = +1} }, { MODKEY, XKB_KEY_k, focusstack, {.i = -1} }, @@ -147,6 +160,7 @@ static const Key keys[] = { { MODKEY, XKB_KEY_l, setmfact, {.f = +0.05f} }, { MODKEY|WLR_MODIFIER_LOGO, XKB_KEY_h, incgaps, {.i = +1 } }, { MODKEY|WLR_MODIFIER_LOGO, XKB_KEY_l, incgaps, {.i = -1 } }, + { MODKEY|WLR_MODIFIER_LOGO|WLR_MODIFIER_SHIFT, XKB_KEY_H, incogaps, {.i = +1 } }, { MODKEY|WLR_MODIFIER_LOGO|WLR_MODIFIER_SHIFT, XKB_KEY_L, incogaps, {.i = -1 } }, { MODKEY|WLR_MODIFIER_LOGO|WLR_MODIFIER_CTRL, XKB_KEY_h, incigaps, {.i = +1 } }, @@ -163,15 +177,20 @@ static const Key keys[] = { { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_O, incovgaps, {.i = -1 } }, { MODKEY, XKB_KEY_Return, zoom, {0} }, { MODKEY, XKB_KEY_Tab, view, {0} }, - { MODKEY, XKB_KEY_q, killclient, {0} }, - { MODKEY, XKB_KEY_t, setlayout, {.v = &layouts[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_m, setlayout, {.v = &layouts[2]} }, */ + /* not using monocle layout ... */ + /* rmpc */ + /*{ MODKEY,WLR_MODIFIER_SHIFT, XKB_KEY_M, spawn, SHCMD(TERMINAL " -e neomutt ") },*/ { MODKEY, XKB_KEY_space, setlayout, {0} }, { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_space, togglefloating, {0} }, { MODKEY, XKB_KEY_e, togglefullscreen, {0} }, - { MODKEY, XKB_KEY_a, toggleswallow, {0} }, - { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_A, toggleautoswallow,{0} }, + + /*{ MODKEY, XKB_KEY_a, toggleswallow, {0} }, */ + /*{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_A, toggleautoswallow,{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} }, @@ -187,7 +206,6 @@ static const Key keys[] = { 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} }, |
