diff options
author | Canop <cano.petrole@gmail.com> | 2019-12-14 15:04:29 +0100 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2019-12-14 15:04:29 +0100 |
commit | f78e8452be44f60686b7e76eef3482283d45472f (patch) | |
tree | cdeb109a5ccea14fba4e908f7657fdaccd23d4f0 | |
parent | 4a2e7b338d1f2ae288c563553a031abb5b1fad8d (diff) |
specific skins for file owner and group
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | img/20191214-replace-ls.png | bin | 49776 -> 57064 bytes | |||
-rw-r--r-- | src/conf.rs | 2 | ||||
-rw-r--r-- | src/displayable_tree.rs | 6 | ||||
-rw-r--r-- | src/skin.rs | 6 | ||||
-rw-r--r-- | website/docs/img/20191214-replace-ls.png | bin | 49776 -> 57064 bytes | |||
-rw-r--r-- | website/docs/index.md | 4 |
8 files changed, 18 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e50359..e70e143 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ * fuzzy search performance improvement * verb invocation now optional so that a verb can be defined to just introduce a keyboard shortcut * changes in br shell function storage and sourcing from fish, bash, and zsh. Fixes #39 and #53. This means broot will ask you again to install the br function +* owner and group separately skinned <a name="v0.10.3"></a> ### v0.10.3 - 2019-11-27 @@ -78,8 +78,12 @@ And you can add shorcuts, for example a `ctrl` sequence or a function key ### Replace `ls` (and its clones): +If you want to display *dates* and *permissions*, do `br -dp` which gets you this: + ![replace ls](img/20191214-replace-ls.png) +You may also toggle options with a few keystrokes while inside broot. For example hitting a space, a `d` then enter shows you the dates. + ### See what takes space: ![size](img/20191112-sizes.png) diff --git a/img/20191214-replace-ls.png b/img/20191214-replace-ls.png Binary files differindex 657968f..842bb23 100644 --- a/img/20191214-replace-ls.png +++ b/img/20191214-replace-ls.png diff --git a/src/conf.rs b/src/conf.rs index de8189e..46d9f86 100644 --- a/src/conf.rs +++ b/src/conf.rs @@ -210,6 +210,8 @@ execution = "$PAGER {file}" # link = "Magenta none" # pruning = "rgb(89, 73, 101) none Italic" # permissions = "gray(12) none " +# owner = "gray(12) none " +# group = "gray(12) none " # selected_line = "none gray(3)" # char_match = "yellow none" # file_error = "Red none" diff --git a/src/displayable_tree.rs b/src/displayable_tree.rs index 5e5f7b1..df21e47 100644 --- a/src/displayable_tree.rs +++ b/src/displayable_tree.rs @@ -216,10 +216,10 @@ impl<'s, 't> DisplayableTree<'s, 't> { if tree.options.show_permissions && line_index > 0 { if line.is_selectable() { self.skin.permissions.queue(f, line.mode())?; - let user = permissions::user_name(line.metadata.uid()); - write!(f, " {:w$}", &user, w = user_group_max_lengths.0,)?; + let owner = permissions::user_name(line.metadata.uid()); + self.skin.owner.queue(f, format!(" {:w$}", &owner, w = user_group_max_lengths.0,))?; let group = permissions::group_name(line.metadata.gid()); - write!(f, " {:w$} ", &group, w = user_group_max_lengths.1,)?; + self.skin.group.queue(f, format!(" {:w$} ", &group, w = user_group_max_lengths.1,))?; } else { let length = 9 + 1 +user_group_max_lengths.0 + 1 + user_group_max_lengths.1 + 1; for _ in 0..length { diff --git a/src/skin.rs b/src/skin.rs index 6b2020b..a2f3839 100644 --- a/src/skin.rs +++ b/src/skin.rs @@ -79,8 +79,10 @@ Skin! { exe: Some(Cyan), None; link: Some(Magenta), None; pruning: gray(12), None; {Italic} - permissions: gray(15), None; - dates: ansi(109), None; + permissions: ansi(94), None; + owner: ansi(138), None; + group: ansi(131), None; + dates: ansi(66), None; selected_line: None, gray(4); char_match: Some(Green), None; file_error: Some(Red), None; diff --git a/website/docs/img/20191214-replace-ls.png b/website/docs/img/20191214-replace-ls.png Binary files differindex 657968f..842bb23 100644 --- a/website/docs/img/20191214-replace-ls.png +++ b/website/docs/img/20191214-replace-ls.png diff --git a/website/docs/index.md b/website/docs/index.md index 516a45c..8525de0 100644 --- a/website/docs/index.md +++ b/website/docs/index.md @@ -66,8 +66,12 @@ And you can add shorcuts, for example a `ctrl` sequence or a function key # Replace `ls` (and its clones): +If you want to display *dates* and *permissions*, do `br -dp` which gets you this: + ![replace ls](img/20191214-replace-ls.png) +You may also toggle options with a few keystrokes while inside broot. For example hitting a space, a `d` then enter shows you the dates. Or a space, then `h` then enter and you show hidden files. + # See what takes space: ![size](img/20191112-sizes.png) |