From 26d5fa6e438357ce3b8f9f5939b07812df38af48 Mon Sep 17 00:00:00 2001 From: zwPapEr Date: Fri, 7 Jan 2022 22:42:25 +0800 Subject: [PATCH] theme: :memo: :sparkles: add docs for partial theme Signed-off-by: zwPapEr --- CHANGELOG.md | 3 ++- README.md | 14 ++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91f134778..2782ea80b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Added support for the MISSING / mi= dircolors variable for broken symlink targets. - Add support for theme from [zwpaper](https://github.com/zwpaper) [#452](https://github.com/Peltoche/lsd/pull/452) +- Update theme to support partial themes [zwpaper](https://github.com/zwpaper) [#591](https://github.com/Peltoche/lsd/pull/591) - Update minimal rust version to 1.42.0 from [zwpaper](https://github.com/zwpaper) [#534](https://github.com/Peltoche/lsd/issues/534) - [`NO_COLOR`](https://no-color.org/) environment variable support from [AnInternetTroll](https://github.com/aninternettroll) ### Changed @@ -17,7 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add `--config-file` flag to read configuration file from a custom location - Clarify custom date format for `date` field in configuration file in the README. ### Fixed -- Support all `strftime` like formatting [#532](https://github.com/Peltoche/lsd/issues/532) +- Support all `strftime` like formatting [#532](https://github.com/Peltoche/lsd/issues/532) ## [0.20.1] - 2021-03-07 ### Fixed diff --git a/README.md b/README.md index e6dde30af..9ab3fca44 100644 --- a/README.md +++ b/README.md @@ -228,17 +228,16 @@ Check [Theme file content](#theme-file-content) for details. ### Theme file content Theme file use the [crossterm](https://crates.io/crates/crossterm) -configure the colors, check [crossterm](https://docs.rs/crossterm/0.20.0/crossterm/style/enum.Color.html) -for the supported colors. +to configure the colors, check [crossterm](https://docs.rs/crossterm/0.20.0/crossterm/style/enum.Color.html) +for supported colors. Color table: https://upload.wikimedia.org/wikipedia/commons/1/15/Xterm_256color_chart.svg -Please notice that color value would ignore case, both lowercase and UPPERCASE is supported. +Please notice that color values would ignore the case, both lowercase and UPPERCASE is supported. This is the default theme scheme shipped with `lsd`. ```yaml -default: 245 user: 230 group: 187 permission: @@ -265,8 +264,11 @@ links: tree-edge: 245 ``` -The `default` item is required while the others are optional, -it will use the `default` value as color for the items missed. +When creating a theme for `lsd`, you can specify any part of the default theme, +and then change its colors, the items missed would fallback to use the default colors. + +Please also notice that an empty theme is **NOT** supported due to +[a bug in serde lib](https://github.com/dtolnay/serde-yaml/issues/86). ## External Configurations