vt: track cwd via OSC 7; add a new-window action

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I498a1938ca0129d10cf0e230d27188ed6a6a6964
This commit is contained in:
raf 2026-06-25 13:31:15 +03:00
commit 0c0da3d035
No known key found for this signature in database
GPG key ID: 29D95B64378DB4BF
3 changed files with 87 additions and 0 deletions

View file

@ -20,6 +20,7 @@ pub enum Action {
FontDecrease,
FontReset,
Fullscreen,
NewWindow,
}
impl Action {
@ -37,6 +38,7 @@ impl Action {
"font-decrease" => Self::FontDecrease,
"font-reset" => Self::FontReset,
"fullscreen" => Self::Fullscreen,
"new-window" => Self::NewWindow,
_ => return None,
})
}
@ -171,6 +173,7 @@ const DEFAULT_BINDINGS: &[(&str, &str)] = &[
("Ctrl+minus", "font-decrease"),
("Ctrl+0", "font-reset"),
("F11", "fullscreen"),
("Ctrl+Shift+N", "new-window"),
];
/// Map a key token to a keysym: a single character, or a named special key.