diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ead2f1..10de0b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## next +- Add `Konsole` as a available terminal for iterm2 images + ## 0.10.0 - Add `icy_sixel` feature that uses a Rust implementation of Sixel - Remove `lazy_static` dependency in favor of `std::sync::LazyLock` diff --git a/src/printer/iterm.rs b/src/printer/iterm.rs index 7c1f612..e6840be 100644 --- a/src/printer/iterm.rs +++ b/src/printer/iterm.rs @@ -109,6 +109,15 @@ fn check_iterm_support() -> bool { return true; } } + + // Konsole does not have "TERM_PROGRAM" and only has "TERM=xterm-256color", which is too generic + // but in exchange, there is the following Konsole-only environment variable with which we can detect it + if let Ok(version) = std::env::var("KONSOLE_VERSION") { + if !version.is_empty() { + return true; + } + } + false }