fix: add Alacritty to the database as a terminal that doesn't support any image protocol (#2107)

This commit is contained in:
三咲雅 · Misaki Masa 2024-12-27 23:09:45 +08:00 committed by GitHub
parent d754ac5dac
commit 9117fe262f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,6 +13,7 @@ pub enum Brand {
Ghostty, Ghostty,
Microsoft, Microsoft,
Rio, Rio,
Alacritty,
BlackBox, BlackBox,
VSCode, VSCode,
Tabby, Tabby,
@ -38,6 +39,7 @@ impl Brand {
("WEZTERM_EXECUTABLE", B::WezTerm), ("WEZTERM_EXECUTABLE", B::WezTerm),
("GHOSTTY_RESOURCES_DIR", B::Ghostty), ("GHOSTTY_RESOURCES_DIR", B::Ghostty),
("WT_Session", B::Microsoft), ("WT_Session", B::Microsoft),
("ALACRITTY_WINDOW_ID", B::Alacritty),
("VSCODE_INJECTION", B::VSCode), ("VSCODE_INJECTION", B::VSCode),
("TABBY_CONFIG_DIRECTORY", B::Tabby), ("TABBY_CONFIG_DIRECTORY", B::Tabby),
]; ];
@ -66,6 +68,7 @@ impl Brand {
"foot-extra" => return Some(B::Foot), "foot-extra" => return Some(B::Foot),
"xterm-ghostty" => return Some(B::Ghostty), "xterm-ghostty" => return Some(B::Ghostty),
"rio" => return Some(B::Rio), "rio" => return Some(B::Rio),
"alacritty" => return Some(B::Alacritty),
"rxvt-unicode-256color" => return Some(B::Urxvt), "rxvt-unicode-256color" => return Some(B::Urxvt),
_ => warn!("[Adapter] Unknown TERM: {term}"), _ => warn!("[Adapter] Unknown TERM: {term}"),
} }
@ -98,6 +101,7 @@ impl Brand {
B::Ghostty => &[A::Kgp], B::Ghostty => &[A::Kgp],
B::Microsoft => &[A::Sixel], B::Microsoft => &[A::Sixel],
B::Rio => &[A::Iip, A::Sixel], B::Rio => &[A::Iip, A::Sixel],
B::Alacritty => &[],
B::BlackBox => &[A::Sixel], B::BlackBox => &[A::Sixel],
B::VSCode => &[A::Iip, A::Sixel], B::VSCode => &[A::Iip, A::Sixel],
B::Tabby => &[A::Iip, A::Sixel], B::Tabby => &[A::Iip, A::Sixel],