diff options
author | Canop <cano.petrole@gmail.com> | 2024-03-09 11:36:29 +0100 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2024-03-09 11:36:29 +0100 |
commit | 8305fc3e6a844be071a91da51b9811dc68a1ecdc (patch) | |
tree | 47d3527592701d34fd5a733f08922c2131d010a8 | |
parent | eb4d97a0333ddb80f2b324ed7d43824a151fbaf9 (diff) |
version 1.36.0v1.36.0
-rw-r--r-- | CHANGELOG.md | 5 | ||||
-rw-r--r-- | Cargo.lock | 16 | ||||
-rw-r--r-- | Cargo.toml | 4 | ||||
-rw-r--r-- | bacon.toml | 2 | ||||
-rw-r--r-- | features.md | 15 | ||||
-rw-r--r-- | src/kitty/detect_support.rs | 8 |
6 files changed, 29 insertions, 21 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index f39c024..77bae7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,10 @@ -### next +### v1.36.0 - 2024-03-01 +<a name="v1.36.0"></a> - releases at github should be more `cargo binstall` friendly - Thanks @FrancescElies - improved `--help` +- new `:stage_all_directories` internal - Fix #844 - `:print_tree` is one line shorter, so as to let the original shell command visible without scroll +- fix and document the "kitty-csi-check" optional feature which can be enabled at compilation ### v1.35.0 - 2024-03-01 <a name="v1.35.0"></a> @@ -217,7 +217,7 @@ checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" [[package]] name = "broot" -version = "1.35.1-dev" +version = "1.36.0" dependencies = [ "ahash 0.8.11", "ansi_colours", @@ -270,7 +270,7 @@ dependencies = [ "unicode-width", "uzers", "which", - "xterm-query 0.1.0", + "xterm-query", ] [[package]] @@ -2147,7 +2147,7 @@ dependencies = [ "coolor", "crossterm", "thiserror", - "xterm-query 0.3.0", + "xterm-query", ] [[package]] @@ -2870,16 +2870,6 @@ checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9" [[package]] name = "xterm-query" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcf3ae9267e2d939a754366532ed14fc9c4eeb08eb4f51884c3036c85e9120b4" -dependencies = [ - "nix 0.22.3", - "thiserror", -] - -[[package]] -name = "xterm-query" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a6af094c5a26cf7663e97d92f69dd6f4c131e90e95ac64308289fce9168c066" @@ -1,6 +1,6 @@ [package] name = "broot" -version = "1.35.1-dev" +version = "1.36.0" authors = ["dystroy <denys.seguret@gmail.com>"] repository = "https://github.com/Canop/broot" homepage = "https://dystroy.org/broot" @@ -66,7 +66,7 @@ trash = "3.1.2" umask = "2.1.0" unicode-width = "0.1.10" which = "4.4.0" -xterm-query = { version = "0.1", optional = true } +xterm-query = { version = "0.3", optional = true } [dev-dependencies] glassbench = "0.4" @@ -14,7 +14,7 @@ watch = ["tests", "benches", "examples"] command = [ "cargo", "check", "--color", "always", - "--features", "clipboard", + "--features", "clipboard, kitty-csi-check", ] need_stdout = false watch = ["benches"] diff --git a/features.md b/features.md index 3d54e0a..f2b0e1d 100644 --- a/features.md +++ b/features.md @@ -1,16 +1,27 @@ - This page defines the optional features which may be applied on compilation: * clipboard +* kitty-csi-check Feature gating is usually temporary: they may be removed when a technical problem is solved, when a feature becomes "mainstream", or when it's dropped because no user mentioned using it. ## The "clipboard" feature -This feature allows the `:copy_path` verb which copies the currently selected path into the clipboard. +This feature allows the `:copy_path` verb which copies the currently selected path into the clipboard, as well as copy-pasting from,to,whithin the input. Limits: - the feature doesn't compile right now on some platforms (for example Raspberry) - on some platforms the content leaves the clipboard when you quit broot (so you must paste while broot is still running) + +## The "kitty-csi-check" feature + +The Kitty graphics protocol allows displaying images in high resolution in broot. + +Most terminals don't support it, so support must be verified. + +Doing this with CSI escape sequences is a solution, but it involve delays and should only be enabled when this support can't be determined with [environment variables](https://dystroy.org/broot/launch/#environment-variables). + +Enabling this feature is thus not recommended unless you use a terminal you know support this protocol and isn't recognized by broot. If this happen, please tell me so that we can update one of the fast checks. + diff --git a/src/kitty/detect_support.rs b/src/kitty/detect_support.rs index da36411..59bffce 100644 --- a/src/kitty/detect_support.rs +++ b/src/kitty/detect_support.rs @@ -61,8 +61,12 @@ pub fn is_kitty_graphics_protocol_supported() -> bool { #[cfg(feature = "kitty-csi-check")] { let start = std::time::Instant::now(); - const TIMEOUT_MS: isize = 400; - let s = match xterm_query::query("\x1b_Gi=31,s=1,v=1,a=q,t=d,f=24;AAAA\x1b\\\x1b[c", TIMEOUT_MS) { + const TIMEOUT_MS: u64 = 200; + let response = xterm_query::query( + "\x1b_Gi=31,s=1,v=1,a=q,t=d,f=24;AAAA\x1b\\\x1b[c", + TIMEOUT_MS, + ); + let s = match response { Err(e) => { debug!("xterm querying failed: {}", e); false |