Skip to content

Commit

Permalink
add rio terminal support to sixel and iterm2 protocol (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphamorim authored Dec 21, 2024
1 parent 56e9e51 commit 74f7659
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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

0 comments on commit 74f7659

Please sign in to comment.