Skip to content

Commit

Permalink
version 1.36.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Canop committed Mar 9, 2024
1 parent eb4d97a commit 8305fc3
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 21 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
16 changes: 3 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "broot"
version = "1.35.1-dev"
version = "1.36.0"
authors = ["dystroy <[email protected]>"]
repository = "https://github.com/Canop/broot"
homepage = "https://dystroy.org/broot"
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion bacon.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
15 changes: 13 additions & 2 deletions features.md
Original file line number Diff line number Diff line change
@@ -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.

8 changes: 6 additions & 2 deletions src/kitty/detect_support.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8305fc3

Please sign in to comment.