aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorlukeflo2025-02-21 21:55:17 +0100
committerlukeflo2025-02-21 21:55:17 +0100
commitc34412d9e3725bed48af925646110f2ca34b1bd4 (patch)
treee7f48bb25a605aeccf0c31ed310f1c7a1ae9e067 /README.md
parentddb6326c1896b82b759d930fb08ea46a820e275a (diff)
downloadbibiman-c34412d9e3725bed48af925646110f2ca34b1bd4.tar.gz
bibiman-c34412d9e3725bed48af925646110f2ca34b1bd4.zip
implement working config file construct, error handling should be improved
Diffstat (limited to 'README.md')
-rw-r--r--README.md58
1 files changed, 41 insertions, 17 deletions
diff --git a/README.md b/README.md
index d62c847..41ebdfc 100644
--- a/README.md
+++ b/README.md
@@ -87,16 +87,6 @@ bibman tests/multi-files/
bibiman tests/biblatex-test.bib tests/multi-files/
```
-Furthermore, in issue #3 it was asked to enable a color customization to run
-`bibiman` also in terminal setups with light background. Thus, now it is
-possible to enable a light terminal mode with the `--light-terminal` flag. Full
-color customization is not possible right now, but maybe will be added with the
-implementation of a config file.
-
-Here is how the light terminal scheme looks:
-
-![bibiman-light-theme.png](https://codeberg.org/attachments/7fe9d58d-7e90-4043-9402-5e4664c4e22a)
-
## Configuration
### Location of Config File
@@ -119,13 +109,14 @@ which takes precedence over the standard one for the active session:
bibiman --config-file="/path/to/temporary/config"
```
-### Values
+### General Configuration
-At the moment, the following values can be set through the config file:
+The following general values can be set through the config file:
```toml
[general]
# Default files/dirs which are loaded on startup
+# Use absolute paths (~ for HOME works). Otherwise, loading might not work.
bibfiles = [ "/path/to/bibfile", "path/to/dir/with/bibfiles" ]
# Default editor to use when editing files. Arguments are possible
editor = "vim" # with args: "vim -y"
@@ -135,11 +126,44 @@ pdf_opener = "xdg-open"
url_opener = "xdg-open"
```
-No value *needs* to be set. For every one exists a default value. Only exception
-is the `bibfiles` key. If no file or dir is set, you *have to* add a path via
-CLI interface. If the `bibfiles` value is set *and* a further path (or multiple)
-is provided through the CLI call, the entries of all those files will be opened
-in the started `bibiman` session.
+If no file or dir is set as `bibfiles` value, you *have to* add a path via CLI
+interface. If the `bibfiles` value is set *and* a further path (or multiple) is
+provided through the CLI call, the entries of all those files will be opened in
+the started `bibiman` session.
+
+### Color Configuration
+
+Furthermore, it is now possible to customize the colors. The following values
+can be changed:
+
+```toml
+[colors]
+# Default values for dark-themed terminal
+main_text_color = "250"
+highlight_text_color = "254"
+entry_color = "36"
+keyword_color = "101"
+info_color = "99"
+confirm_color = "47"
+warn_color = "124"
+bar_bg_color = "234"
+popup_bg_color = "234"
+selected_row_bg_color = "237"
+```
+
+Colors can be set through three different methods:
+[ANSI color names](https://docs.rs/ratatui/latest/ratatui/style/enum.Color.html),
+[256-color indices](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) and
+[HEX codes](https://www.w3schools.com/colors/colors_hexadecimal.asp). For
+example, the following definitions are all valid:
+
+```toml
+selected_row_bg_color = "darkgray" # ANSI color name (light_black or bright_black would also work)
+selected_row_bg_color = "237" # 256-color index
+selected_row_bg_color = "#3a3a3a" # HEX code
+```
+
+To run `bibiman` with some default values for a light-colored terminal use the `--light-terminal` flag.
## Features