diff options
author | Canop <cano.petrole@gmail.com> | 2021-06-26 13:35:03 +0200 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2021-06-26 13:35:50 +0200 |
commit | a8f118e0564963635539ccec3b99abbd9c6332d3 (patch) | |
tree | 818c185030104b7cbc7500ac5e589ed38a15c6f8 /src | |
parent | ccb6126c23c6dbff8ec914fb17a2146004ea37e0 (diff) |
Reading the TERMINAL env var to try recognize Kitty
Only the TERM env var was previously checked
Fix #410
Diffstat (limited to 'src')
-rw-r--r-- | src/kitty/image_renderer.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/kitty/image_renderer.rs b/src/kitty/image_renderer.rs index 186d2c0..1da76a4 100644 --- a/src/kitty/image_renderer.rs +++ b/src/kitty/image_renderer.rs @@ -88,6 +88,13 @@ const CHUNK_SIZE: usize = 4096; /// terminal, I think I can just check the name pub fn is_term_kitty() -> bool { if let Ok(term_name) = env::var("TERM") { + debug!("TERM env var: {:?}", env::var("TERM")); + if term_name.contains("kitty") { + return true; + } + } + if let Ok(term_name) = env::var("TERMINAL") { + debug!("TERMINAL env var: {:?}", env::var("TERMINAL")); if term_name.contains("kitty") { return true; } |