vt: add OSC 133 prompt marks with jump and pipe-output actions

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I0afe252fefa3eb82559a35d03ba449376a6a6964
This commit is contained in:
raf 2026-06-25 13:41:34 +03:00
commit 72ec651ff1
No known key found for this signature in database
GPG key ID: 29D95B64378DB4BF
5 changed files with 208 additions and 1 deletions

View file

@ -21,6 +21,9 @@ pub enum Action {
FontReset,
Fullscreen,
NewWindow,
JumpPromptUp,
JumpPromptDown,
PipeCommandOutput,
}
impl Action {
@ -39,6 +42,9 @@ impl Action {
"font-reset" => Self::FontReset,
"fullscreen" => Self::Fullscreen,
"new-window" => Self::NewWindow,
"jump-prompt-up" => Self::JumpPromptUp,
"jump-prompt-down" => Self::JumpPromptDown,
"pipe-command-output" => Self::PipeCommandOutput,
_ => return None,
})
}
@ -174,6 +180,8 @@ const DEFAULT_BINDINGS: &[(&str, &str)] = &[
("Ctrl+0", "font-reset"),
("F11", "fullscreen"),
("Ctrl+Shift+N", "new-window"),
("Ctrl+Shift+Up", "jump-prompt-up"),
("Ctrl+Shift+Down", "jump-prompt-down"),
];
/// Map a key token to a keysym: a single character, or a named special key.