Skip to content

Commit 2220ce4

Browse files
committed
feat: use kitty image protocol in ghostty
1 parent ec192d1 commit 2220ce4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/media/emulator.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ pub enum TerminalEmulator {
1515
Mlterm,
1616
St,
1717
Xterm,
18+
Ghostty,
1819
Unknown,
1920
}
2021

@@ -64,13 +65,14 @@ impl TerminalEmulator {
6465
TerminalEmulator::Mlterm => term == "mlterm",
6566
TerminalEmulator::St => term == "st-256color",
6667
TerminalEmulator::Xterm => ["xterm", "xterm-256color"].contains(&term),
68+
TerminalEmulator::Ghostty => term_program.contains("ghostty"),
6769
TerminalEmulator::Unknown => true,
6870
}
6971
}
7072

7173
fn supports_graphics_mode(&self, mode: &GraphicsMode) -> bool {
7274
match (mode, self) {
73-
(GraphicsMode::Kitty { mode, inside_tmux }, Self::Kitty | Self::WezTerm) => match mode {
75+
(GraphicsMode::Kitty { mode, inside_tmux }, Self::Kitty | Self::WezTerm | Self::Ghostty) => match mode {
7476
KittyMode::Local => local_mode_supported(*inside_tmux).unwrap_or_default(),
7577
KittyMode::Remote => true,
7678
},

0 commit comments

Comments
 (0)