Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add rio terminal support to sixel and iterm2 protocol #64

Merged
merged 1 commit into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/printer/iterm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ fn print_buffer(
// Check if the iTerm protocol can be used
fn check_iterm_support() -> bool {
if let Ok(term) = std::env::var("TERM_PROGRAM") {
if term.contains("iTerm") || term.contains("WezTerm") || term.contains("mintty") {
if term.contains("iTerm") || term.contains("WezTerm") || term.contains("mintty") || term.contains("rio") {
return true;
}
}
if let Ok(lc_term) = std::env::var("LC_TERMINAL") {
if lc_term.contains("iTerm") || lc_term.contains("WezTerm") || lc_term.contains("mintty") {
if lc_term.contains("iTerm") || lc_term.contains("WezTerm") || lc_term.contains("mintty") || lc_term.contains("rio") {
return true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/printer/sixel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ fn check_device_attrs() -> ViuResult<bool> {
fn check_sixel_support() -> bool {
if let Ok(term) = std::env::var("TERM") {
match term.as_str() {
"mlterm" | "yaft-256color" | "foot" | "foot-extra" | "eat-truecolor" => return true,
"mlterm" | "yaft-256color" | "foot" | "foot-extra" | "eat-truecolor" | "rio" => return true,
"st-256color" | "xterm" | "xterm-256color" => {
return check_device_attrs().unwrap_or(false)
}
Expand Down