linux-qubasis

linux oasis port as a qubes template

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

commit aea21246c87f790bb6a29fc3c2c0d44c86f359dd
parent 5a8a969895169da56d9be4e2abffeb2a730d1397
Author: Jul <jul@9o.is>
Date:   Thu, 31 Jul 2025 22:38:57 -0400

add fzy half page up down keybindings

Diffstat:
Mpkg/fzy/patches/0001-add-carriage-return-to-tty_clearline.patch | 2+-
Mpkg/fzy/patches/0002-Reduce-screen-and-cursor-flickering.patch | 2+-
Mpkg/fzy/patches/0003-add-multi-selection.patch | 2+-
Mpkg/fzy/patches/0004-truncate-entries-to-terminal-width.patch | 2+-
Apkg/fzy/patches/0005-add-half-page-up-down-vi-actions.patch | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 70 insertions(+), 4 deletions(-)

diff --git a/pkg/fzy/patches/0001-add-carriage-return-to-tty_clearline.patch b/pkg/fzy/patches/0001-add-carriage-return-to-tty_clearline.patch @@ -1,7 +1,7 @@ From a7f705a08f5a10b0cdb76ffddd1dee0e3d06ea48 Mon Sep 17 00:00:00 2001 From: Jul <jul@qh.is> Date: Thu, 31 Jul 2025 00:13:39 -0400 -Subject: [PATCH 1/4] add carriage return to tty_clearline +Subject: [PATCH 1/5] add carriage return to tty_clearline --- src/tty.c | 2 +- diff --git a/pkg/fzy/patches/0002-Reduce-screen-and-cursor-flickering.patch b/pkg/fzy/patches/0002-Reduce-screen-and-cursor-flickering.patch @@ -1,7 +1,7 @@ From 03c3ef3fd9e0638331453db4bbdec091f61c1572 Mon Sep 17 00:00:00 2001 From: leo-arch <leonardoabramovich2@gmail.com> Date: Fri, 18 Jul 2025 21:39:07 -0300 -Subject: [PATCH 2/4] Reduce screen and cursor flickering +Subject: [PATCH 2/5] Reduce screen and cursor flickering --- src/tty.c | 8 ++++++++ diff --git a/pkg/fzy/patches/0003-add-multi-selection.patch b/pkg/fzy/patches/0003-add-multi-selection.patch @@ -1,7 +1,7 @@ From 46be6d0fb07fa23cb2e2740b31c0f7208242e770 Mon Sep 17 00:00:00 2001 From: Jul <jul@qh.is> Date: Thu, 31 Jul 2025 03:34:16 -0400 -Subject: [PATCH 3/4] add multi-selection +Subject: [PATCH 3/5] add multi-selection --- src/config.def.h | 1 + diff --git a/pkg/fzy/patches/0004-truncate-entries-to-terminal-width.patch b/pkg/fzy/patches/0004-truncate-entries-to-terminal-width.patch @@ -1,7 +1,7 @@ From 9496f88eda3de63e1cced43398402a53f6ee21de Mon Sep 17 00:00:00 2001 From: Jul <jul@qh.is> Date: Thu, 31 Jul 2025 05:34:48 -0400 -Subject: [PATCH 4/4] truncate entries to terminal width +Subject: [PATCH 4/5] truncate entries to terminal width --- src/tty_interface.c | 4 ++++ diff --git a/pkg/fzy/patches/0005-add-half-page-up-down-vi-actions.patch b/pkg/fzy/patches/0005-add-half-page-up-down-vi-actions.patch @@ -0,0 +1,66 @@ +From 18e67f8559034152c57dafe5b9dfafd82e4ffbf0 Mon Sep 17 00:00:00 2001 +From: Jul <jul@qh.is> +Date: Thu, 31 Jul 2025 22:37:31 -0400 +Subject: [PATCH 5/5] add half page up down vi actions + +--- + src/tty_interface.c | 21 ++++++++++++++------- + 1 file changed, 14 insertions(+), 7 deletions(-) + +diff --git a/src/tty_interface.c b/src/tty_interface.c +index 9944af1..005e443 100644 +--- a/src/tty_interface.c ++++ b/src/tty_interface.c +@@ -331,11 +331,6 @@ static void action_del_word(tty_interface_t *state) { + state->cursor = cursor; + } + +-static void action_del_all(tty_interface_t *state) { +- memmove(state->search, &state->search[state->cursor], strlen(state->search) - state->cursor + 1); +- state->cursor = 0; +-} +- + static void action_prev(tty_interface_t *state) { + update_state(state); + choices_prev(state->choices); +@@ -350,6 +345,18 @@ static void action_next(tty_interface_t *state) { + choices_next(state->choices); + } + ++static void action_halfpagedown(tty_interface_t *state) { ++ update_state(state); ++ for (size_t i = 0; i < state->options->num_lines / 2 && state->choices->selection < state->choices->available - 1; i++) ++ choices_next(state->choices); ++} ++ ++static void action_halfpageup(tty_interface_t *state) { ++ update_state(state); ++ for (size_t i = 0; i < state->options->num_lines / 2 && state->choices->selection > 0; i++) ++ choices_prev(state->choices); ++} ++ + static void action_left(tty_interface_t *state) { + if (state->cursor > 0) { + state->cursor--; +@@ -449,16 +456,16 @@ static const keybinding_t keybindings[] = {{"\x1b", action_exit}, /* ESC * + + {KEY_CTRL('H'), action_del_char}, /* Backspace (C-H) */ + {KEY_CTRL('W'), action_del_word}, /* C-W */ +- {KEY_CTRL('U'), action_del_all}, /* C-U */ + {KEY_CTRL('I'), action_autocomplete}, /* TAB (C-I ) */ + {KEY_CTRL('C'), action_exit}, /* C-C */ +- {KEY_CTRL('D'), action_exit}, /* C-D */ + {KEY_CTRL('G'), action_exit}, /* C-G */ + {KEY_CTRL('M'), action_emit}, /* CR */ + {KEY_CTRL('P'), action_prev}, /* C-P */ + {KEY_CTRL('N'), action_next}, /* C-N */ + {KEY_CTRL('K'), action_prev}, /* C-K */ + {KEY_CTRL('J'), action_next}, /* C-J */ ++ {KEY_CTRL('U'), action_halfpageup}, /* C-U */ ++ {KEY_CTRL('D'), action_halfpagedown}, /* C-D */ + {KEY_CTRL('A'), action_beginning}, /* C-A */ + {KEY_CTRL('E'), action_end}, /* C-E */ + +-- +2.50.1 +