summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCanop <cano.petrole@gmail.com>2021-06-30 17:27:47 +0200
committerCanop <cano.petrole@gmail.com>2021-06-30 17:27:47 +0200
commitd052ca9c4183c129a3122de025d163117c40d3c2 (patch)
tree9edddf26efd0baa1679f5b77026a14875401c0f1
parente67839b1e63cea6338d170d33a4c39afaac53fb2 (diff)
use termimad 0.13 - better table rendering in narrow terminal
-rw-r--r--Cargo.lock6
-rw-r--r--Cargo.toml2
-rw-r--r--src/display/status_line.rs2
-rw-r--r--src/filesystems/filesystems_state.rs2
-rw-r--r--website/docs/conf_file.md8
-rw-r--r--website/docs/skins.md12
6 files changed, 19 insertions, 13 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 166d33f..d569662 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -181,7 +181,7 @@ dependencies = [
"strict",
"syntect",
"tempfile",
- "termimad 0.12.1",
+ "termimad 0.13.0",
"terminal-clipboard",
"toml",
"umask",
@@ -1658,9 +1658,9 @@ dependencies = [
[[package]]
name = "termimad"
-version = "0.12.1"
+version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "048ecd125577e1dfc10123052e92e457988c6761b7ceff74bf9e8e8c5d44808c"
+checksum = "a09f249613ba31188fd902030fcbc94bbdebb5e881fe7fcb58be16fb50e0d77a"
dependencies = [
"crossbeam",
"crossterm 0.20.0",
diff --git a/Cargo.toml b/Cargo.toml
index b0264dc..6ce86af 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -54,7 +54,7 @@ splitty = "0.1"
strict = "0.1.4"
syntect = "4.5"
tempfile = "3.2"
-termimad = { version = "0.12.0" }
+termimad = "0.13.0"
terminal-clipboard = { version = "0.2.1", optional = true }
toml = "0.5"
umask = "1.0"
diff --git a/src/display/status_line.rs b/src/display/status_line.rs
index 19dbb98..70bfbe0 100644
--- a/src/display/status_line.rs
+++ b/src/display/status_line.rs
@@ -38,7 +38,7 @@ pub fn write(
w,
Composite::from_inline(&status.message),
remaining_width,
- Alignment::Left,
+ Alignment::Unspecified,
)?;
Ok(())
}
diff --git a/src/filesystems/filesystems_state.rs b/src/filesystems/filesystems_state.rs
index aa7a979..707a064 100644
--- a/src/filesystems/filesystems_state.rs
+++ b/src/filesystems/filesystems_state.rs
@@ -304,7 +304,7 @@ impl PanelState for FilesystemState {
cw.queue_g_string(&styles.default, format!("{:width$}", "filesystem", width = wc_fs))?;
cw.queue_char(border_style, '│')?;
if e_dsk {
- cw.queue_g_string(&styles.default, " dsk ".to_string())?;
+ cw.queue_g_string(&styles.default, "disk ".to_string())?;
cw.queue_char(border_style, '│')?;
}
if e_type {
diff --git a/website/docs/conf_file.md b/website/docs/conf_file.md
index 430f12e..1a785fb 100644
--- a/website/docs/conf_file.md
+++ b/website/docs/conf_file.md
@@ -189,11 +189,11 @@ rs = "yellow"
toml = "ansi(105)"
```
-# Syntax Theme
+(see [here](../skins#color) for precision about the color syntax in broot)
-Broot uses [syntect](https://github.com/trishume/syntect) for syntax coloring of previewed files.
+# Syntax Theme
-It's possible to choose any of the standard themes listed [here](https://docs.rs/syntect/latest/syntect/highlighting/struct.ThemeSet.html#impl):
+You can choose any of the following syntaxic coloring themes for previewed files:
* base16-ocean.dark
* base16-eighties.dark
@@ -210,6 +210,8 @@ syntax_theme: base16-ocean.light
syntax_theme = "base16-ocean.light"
```
+Those themes come from [syntect](https://github.com/trishume/syntect) and are bundled in broot.
+
# Number of threads for directory size computation
Most users should not change this. In my measurements a number of 4 to 6 looks optimal.
diff --git a/website/docs/skins.md b/website/docs/skins.md
index 408abe2..a49ab32 100644
--- a/website/docs/skins.md
+++ b/website/docs/skins.md
@@ -185,15 +185,19 @@ directory: "ansi(208) None Bold / ansi(172) None"
directory = "ansi(208) None Bold / ansi(172) None"
```
-A color can be
+## Color
+
+A color in a skin or in the [ext_colors](../conf_file/#colors-by-file-extension) section can be:
* `none`
-* an [Ansi value](https://en.wikipedia.org/wiki/ANSI_escape_code), for example `ansi(160)`
+* an [Ansi value](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit), for example `ansi(160)`
* a grayscale value, with a level between 0 and 23, for example `grey(3)`
* a RGB color, for example `rgb(255, 187, 0)`
Beware that many terminals aren't compatible with RGB 24 bits colors (or aren't usually configured for).
+## Style attributes
+
Currently supported attributes are:
* bold
@@ -600,7 +604,7 @@ skin: {
// default default
help_table_border: "none none"
preview_title: "rgb(147, 161, 161) rgb(238, 232, 213)"
- preview: "rgb(101, 123, 131) rgb(253, 246, 227) / rgb(147, 161, 161) rgb(238, 232, 213)"
+ preview: "rgb(101, 123, 131) rgb(253, 246, 227) / rgb(147, 161, 161) rgb(238, 232, 213)"
preview_line_number: "rgb(147, 161, 161) rgb(238, 232, 213)"
preview_match: "None ansi(29)"
staging_area_title: "gray(22) rgb(253, 246, 227)"
@@ -702,7 +706,7 @@ help_headers = "rgb(181, 137, 0) none"
# default default
help_table_border = "none none"
preview_title = "rgb(147, 161, 161) rgb(238, 232, 213)"
-preview = "rgb(101, 123, 131) rgb(253, 246, 227) / rgb(147, 161, 161) rgb(238, 232, 213)"
+preview = "rgb(101, 123, 131) rgb(253, 246, 227) / rgb(147, 161, 161) rgb(238, 232, 213)"
preview_line_number = "rgb(147, 161, 161) rgb(238, 232, 213)"
preview_match = "None ansi(29)"
staging_area_title = "gray(22) rgb(253, 246, 227)"