summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCanop <cano.petrole@gmail.com>2022-07-06 19:20:25 +0200
committerCanop <cano.petrole@gmail.com>2022-07-06 19:20:25 +0200
commitd4751c863011bf2583b07942363df3f70db37d97 (patch)
tree56892f629b2780fc5df6bc85b3a8db1194fb3329
parent3454e1efa0c90b8680c130e6b98ee87cb85a4f8c (diff)
disable luma detection on non linux platformv1.14.1no-luma-on-non-linux
To fix compilation See #573
-rw-r--r--CHANGELOG.md4
-rw-r--r--Cargo.lock2
-rw-r--r--Cargo.toml6
-rw-r--r--src/display/luma.rs6
-rw-r--r--website/docs/conf_file.md3
5 files changed, 18 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 80111b0..cf2356f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+### v1.14.1 - 2022-07-06
+<a name="v1.14.1"></a>
+Due to a technical problem, background color based skin selection is disabled on non linux systems.
+
### v1.14.0 - 2022-07-05
<a name="v1.14.0"></a>
#### Major Feature: imports
diff --git a/Cargo.lock b/Cargo.lock
index c01cc9c..7357191 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -137,7 +137,7 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "broot"
-version = "1.14.0"
+version = "1.14.1"
dependencies = [
"ahash 0.7.6",
"ansi_colours",
diff --git a/Cargo.toml b/Cargo.toml
index 0e55052..568c8eb 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "broot"
-version = "1.14.0"
+version = "1.14.1"
authors = ["dystroy <denys.seguret@gmail.com>"]
repository = "https://github.com/Canop/broot"
documentation = "https://dystroy.org/broot"
@@ -59,7 +59,6 @@ syntect = { package = "syntect-no-panic", version = "4.6.1" } # see issue #485
tempfile = "3.2"
termimad = "0.20.2"
terminal-clipboard = { version = "0.3.1", optional = true }
-terminal-light = "0.8.1"
toml = "0.5"
umask = "2.0.0"
unicode-width = "0.1.8"
@@ -72,6 +71,9 @@ glassbench = "0.3.3"
lfs-core = "0.11.0"
users = "0.11"
+[target.'cfg(target_os = "linux")'.dependencies]
+terminal-light = "0.8.1"
+
[target.'cfg(windows)'.dependencies]
is_executable = "1.0.1"
diff --git a/src/display/luma.rs b/src/display/luma.rs
index c9e9105..479e4c9 100644
--- a/src/display/luma.rs
+++ b/src/display/luma.rs
@@ -15,6 +15,7 @@ pub enum Luma {
/// Return the light of the terminal background, which is a value
/// between 0 (black) and 1 (white).
+#[cfg(target_os = "linux")]
pub fn luma() -> &'static Result<f32, terminal_light::TlError> {
static LUMA: Lazy<Result<f32, terminal_light::TlError>> = Lazy::new(|| {
let luma = time!(Debug, terminal_light::luma());
@@ -24,6 +25,11 @@ pub fn luma() -> &'static Result<f32, terminal_light::TlError> {
&*LUMA
}
+#[cfg(not(target_os = "linux"))]
+pub fn luma() -> Result<&'static f32, &'static str> {
+ Err("not implemented on this OS")
+}
+
impl Luma {
pub fn read() -> Self {
match luma() {
diff --git a/website/docs/conf_file.md b/website/docs/conf_file.md
index 84b01d3..f1baa41 100644
--- a/website/docs/conf_file.md
+++ b/website/docs/conf_file.md
@@ -68,6 +68,9 @@ Starting from version 1.14, the default configuration is released in several fil
!!! Note
Be careful when installing a configuration file from an unknown source: it may contain an arbitrary command to execute. Check it before importing it
+!!! Note
+ Background color determination is currently disabled (always "unknown") on non linux systems. This is expected to be fixed.
+
# Default flags
Broot accepts a few flags at launch (the complete list is available with `broot --help`.