Skip to content

Commit 221a201

Browse files
hasezoeyatanunq
andauthored
fix(iterm): add Konsole as supported (#89)
* fix(iterm): add Konsole as supported * Update changelog --------- Co-authored-by: atanunq <atanas.yankov98@gmail.com>
1 parent a130328 commit 221a201

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## next
2+
- Add `Konsole` as a available terminal for iterm2 images
3+
14
## 0.10.0
25
- Add `icy_sixel` feature that uses a Rust implementation of Sixel
36
- Remove `lazy_static` dependency in favor of `std::sync::LazyLock`

src/printer/iterm.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,15 @@ fn check_iterm_support() -> bool {
109109
return true;
110110
}
111111
}
112+
113+
// Konsole does not have "TERM_PROGRAM" and only has "TERM=xterm-256color", which is too generic
114+
// but in exchange, there is the following Konsole-only environment variable with which we can detect it
115+
if let Ok(version) = std::env::var("KONSOLE_VERSION") {
116+
if !version.is_empty() {
117+
return true;
118+
}
119+
}
120+
112121
false
113122
}
114123

0 commit comments

Comments
 (0)