linux-qubasis

linux oasis port as a qubes template

git clone https://9o.is/git/linux-qubasis.git

commit bb2c9e51ae16789a45e71821c458d4e45461b747
parent 67a796b20354271877448814a1e3edfa053093da
Author: Jul <jul@9o.is>
Date:   Sat, 19 Jul 2025 23:08:10 -0400

add st-dvtm key bindings

Diffstat:
Mpkg/dvtm/config.h | 54++++++++++++++++++++++--------------------------------
Mpkg/st/config.h | 55+++++++++++++++++++++++++++++++++++++++++++++++++------
2 files changed, 71 insertions(+), 38 deletions(-)

diff --git a/pkg/dvtm/config.h b/pkg/dvtm/config.h @@ -62,37 +62,33 @@ static Layout layouts[] = { #define MOD CTRL('b') #define TAGKEYS(KEY,TAG) \ - { { MOD, 'v', KEY, }, { view, { tags[TAG] } } }, \ + { { MOD, 's', KEY, }, { view, { tags[TAG] } } }, \ { { MOD, 't', KEY, }, { tag, { tags[TAG] } } }, \ - { { MOD, 'V', KEY, }, { toggleview, { tags[TAG] } } }, \ + { { MOD, 'S', KEY, }, { toggleview, { tags[TAG] } } }, \ { { MOD, 'T', KEY, }, { toggletag, { tags[TAG] } } }, /* you can specifiy at most 3 arguments */ static KeyBinding bindings[] = { { { MOD, 'c', }, { create, { NULL } } }, { { MOD, 'C', }, { create, { NULL, NULL, "$CWD" } } }, - { { MOD, 'x', }, { killclient, { NULL } } }, - { { MOD, 'j', }, { focusnext, { NULL } } }, - { { MOD, 'J', }, { focusdown, { NULL } } }, - { { MOD, 'K', }, { focusup, { NULL } } }, - { { MOD, 'H', }, { focusleft, { NULL } } }, - { { MOD, 'L', }, { focusright, { NULL } } }, - { { MOD, 'k', }, { focusprev, { NULL } } }, - { { MOD, 'f', }, { setlayout, { "[]=" } } }, - { { MOD, 'g', }, { setlayout, { "+++" } } }, - { { MOD, 'b', }, { setlayout, { "TTT" } } }, - { { MOD, 'm', }, { setlayout, { "[ ]" } } }, - { { MOD, ' ', }, { setlayout, { NULL } } }, - { { MOD, 'i', }, { incnmaster, { "+1" } } }, - { { MOD, 'd', }, { incnmaster, { "-1" } } }, - { { MOD, 'h', }, { setmfact, { "-0.05" } } }, - { { MOD, 'l', }, { setmfact, { "+0.05" } } }, + { { MOD, 'x', 'x', }, { killclient, { NULL } } }, + { { MOD, 'q', 'q', }, { quit, { NULL } } }, + { { MOD, 'h', }, { focusleft, { NULL } } }, + { { MOD, 'l', }, { focusright, { NULL } } }, + { { MOD, 'j', }, { focusdown, { NULL } } }, + { { MOD, 'k', }, { focusup, { NULL } } }, + { { MOD, '=', ' ', }, { setlayout, { NULL } } }, + { { MOD, '=', 'f', }, { setlayout, { "[]=" } } }, + { { MOD, '=', 'g', }, { setlayout, { "+++" } } }, + { { MOD, '=', 'b', }, { setlayout, { "TTT" } } }, + { { MOD, '=', 'm', }, { setlayout, { "[ ]" } } }, + { { MOD, 'm', KEY_UP, }, { incnmaster, { "+1" } } }, + { { MOD, 'm', KEY_DOWN,}, { incnmaster, { "-1" } } }, + { { MOD, 'm', KEY_LEFT,}, { setmfact, { "-0.05" } } }, + { { MOD, 'm', KEY_RIGHT}, { setmfact, { "+0.05" } } }, { { MOD, '.', }, { toggleminimize, { NULL } } }, - { { MOD, 's', }, { togglebar, { NULL } } }, - { { MOD, 'S', }, { togglebarpos, { NULL } } }, - { { MOD, 'M', }, { togglemouse, { NULL } } }, - { { MOD, '\n', }, { zoom , { NULL } } }, - { { MOD, '\r', }, { zoom , { NULL } } }, + { { MOD, ' ', }, { zoom , { NULL } } }, + { { MOD, 'b', }, { togglebar, { NULL } } }, { { MOD, '1', }, { focusn, { "1" } } }, { { MOD, '2', }, { focusn, { "2" } } }, { { MOD, '3', }, { focusn, { "3" } } }, @@ -102,21 +98,16 @@ static KeyBinding bindings[] = { { { MOD, '7', }, { focusn, { "7" } } }, { { MOD, '8', }, { focusn, { "8" } } }, { { MOD, '9', }, { focusn, { "9" } } }, - { { MOD, '\t', }, { focuslast, { NULL } } }, - { { MOD, 'q', 'q', }, { quit, { NULL } } }, + { { MOD, 'n', }, { focuslast, { NULL } } }, { { MOD, 'a', }, { togglerunall, { NULL } } }, - { { MOD, CTRL('L'), }, { redraw, { NULL } } }, { { MOD, 'r', }, { redraw, { NULL } } }, { { MOD, 'e', }, { copymode, { "dvtm-editor" } } }, - { { MOD, 'E', }, { copymode, { "dvtm-pager" } } }, + { { MOD, 'p', }, { copymode, { "dvtm-pager" } } }, { { MOD, '/', }, { copymode, { "dvtm-pager", "/" } } }, - { { MOD, 'p', }, { paste, { NULL } } }, { { MOD, KEY_PPAGE, }, { scrollback, { "-1" } } }, { { MOD, KEY_NPAGE, }, { scrollback, { "1" } } }, { { MOD, '?', }, { create, { "man dvtm", "dvtm help" } } }, { { MOD, MOD, }, { send, { (const char []){MOD, 0} } } }, - { { KEY_SPREVIOUS, }, { scrollback, { "-1" } } }, - { { KEY_SNEXT, }, { scrollback, { "1" } } }, { { MOD, '0', }, { view, { NULL } } }, { { MOD, KEY_F(1), }, { view, { tags[0] } } }, { { MOD, KEY_F(2), }, { view, { tags[1] } } }, @@ -127,8 +118,7 @@ static KeyBinding bindings[] = { { { MOD, KEY_F(7), }, { view, { tags[6] } } }, { { MOD, KEY_F(8), }, { view, { tags[7] } } }, { { MOD, KEY_F(9), }, { view, { tags[8] } } }, - { { MOD, 'v', '0' }, { view, { NULL } } }, - { { MOD, 'v', '\t', }, { viewprevtag, { NULL } } }, + { { MOD, 's', 't', }, { viewprevtag, { NULL } } }, { { MOD, 't', '0' }, { tag, { NULL } } }, TAGKEYS( '1', 0) TAGKEYS( '2', 1) diff --git a/pkg/st/config.h b/pkg/st/config.h @@ -178,18 +178,61 @@ static MouseShortcut mshortcuts[] = { }; /* Internal keyboard shortcuts. */ -#define MODKEY Mod1Mask +#define MODKEY Mod1Mask|ControlMask static Shortcut shortcuts[] = { /* mask keysym function argument */ - { MODKEY, XK_Prior, zoom, {.f = +1} }, - { MODKEY, XK_Next, zoom, {.f = -1} }, - { MODKEY, XK_Home, zoomreset, {.f = 0} }, + { Mod1Mask, XK_Prior, zoom, {.f = +1} }, + { Mod1Mask, XK_Next, zoom, {.f = -1} }, + { Mod1Mask, XK_Home, zoomreset, {.f = 0} }, { MODKEY, XK_c, clipcopy, {.i = 0} }, { MODKEY, XK_v, clippaste, {.i = 0} }, { MODKEY, XK_y, selpaste, {.i = 0} }, - { XK_ANY_MOD, XK_Page_Up, kscrollup, {.f = -0.2} }, - { XK_ANY_MOD, XK_Page_Down, kscrolldown, {.f = -0.2} }, + + // dvtm remappings + { MODKEY, XK_Return, ttysend, {.s = "\002c"} }, + { MODKEY|ShiftMask, XK_Return, ttysend, {.s = "\002C"} }, + { MODKEY, XK_x, ttysend, {.s = "\002x"} }, + { MODKEY, XK_q, ttysend, {.s = "\002q"} }, + { MODKEY, XK_Left, ttysend, {.s = "\002h"} }, + { MODKEY, XK_Right, ttysend, {.s = "\002l"} }, + { MODKEY, XK_Down, ttysend, {.s = "\002j"} }, + { MODKEY, XK_Up, ttysend, {.s = "\002k"} }, + { MODKEY, XK_equal, ttysend, {.s = "\002="} }, + { MODKEY, XK_m, ttysend, {.s = "\002m"} }, + { MODKEY, XK_period, ttysend, {.s = "\002."} }, + { MODKEY, XK_space, ttysend, {.s = "\002\040"} }, + { MODKEY, XK_b, ttysend, {.s = "\002b"} }, + { MODKEY, XK_1, ttysend, {.s = "\0021"} }, + { MODKEY, XK_2, ttysend, {.s = "\0022"} }, + { MODKEY, XK_3, ttysend, {.s = "\0023"} }, + { MODKEY, XK_4, ttysend, {.s = "\0024"} }, + { MODKEY, XK_5, ttysend, {.s = "\0025"} }, + { MODKEY, XK_6, ttysend, {.s = "\0026"} }, + { MODKEY, XK_7, ttysend, {.s = "\0027"} }, + { MODKEY, XK_8, ttysend, {.s = "\0028"} }, + { MODKEY, XK_9, ttysend, {.s = "\0029"} }, + { MODKEY, XK_0, ttysend, {.s = "\0020"} }, + { MODKEY, XK_n, ttysend, {.s = "\002n"} }, + { MODKEY, XK_a, ttysend, {.s = "\002a"} }, + { MODKEY, XK_r, ttysend, {.s = "\002r"} }, + { MODKEY, XK_e, ttysend, {.s = "\002e"} }, + { MODKEY, XK_p, ttysend, {.s = "\002p"} }, + { MODKEY, XK_slash, ttysend, {.s = "\002/"} }, + { MODKEY, XK_Page_Up, ttysend, {.s = "\002\033[5~"} }, + { MODKEY, XK_Page_Down, ttysend, {.s = "\002\033[6~"} }, + { XK_NO_MOD, XK_F1, ttysend, {.s = "\002\033OP"} }, + { XK_NO_MOD, XK_F2, ttysend, {.s = "\002\033OQ"} }, + { XK_NO_MOD, XK_F3, ttysend, {.s = "\002\033OR"} }, + { XK_NO_MOD, XK_F4, ttysend, {.s = "\002\033OS"} }, + { XK_NO_MOD, XK_F5, ttysend, {.s = "\002\033[15~"} }, + { XK_NO_MOD, XK_F6, ttysend, {.s = "\002\033[17~"} }, + { XK_NO_MOD, XK_F7, ttysend, {.s = "\002\033[18~"} }, + { XK_NO_MOD, XK_F8, ttysend, {.s = "\002\033[19~"} }, + { XK_NO_MOD, XK_F9, ttysend, {.s = "\002\033[20~"} }, + { MODKEY, XK_Tab, ttysend, {.s = "\002st"} }, + { MODKEY, XK_t, ttysend, {.s = "\002t"} }, + { MODKEY, XK_s, ttysend, {.s = "\002s"} }, }; /*