summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorDLFW <daniel@llin.info>2023-10-09 04:39:00 +0200
committerGitHub <noreply@github.com>2023-10-08 22:39:00 -0400
commit8412f0534c7c7c64d3a5ebc602fbb298b9f6eba7 (patch)
tree8eb39b1a3bb138d08dc963c93acd19f0a810de2c /config
parent55d50925498c5b92cb7a327b506cd16f8c611255 (diff)
Scrollable tab-bar (#437)
This implements a scrollable tab bar, like discussed in #233. This makes tabs easier to read, better utilizes the space in the top-bar and makes handling many tabs way easier. The display of the current directory has been removed. The current tab will show the directory always in full form. The directories of other tabs will be shown in full form if there is enough space, otherwise, they will be shown in a short form. If the available space in the top-bar is still not sufficient, scroll tags will be added at each end. The long-form is currently defined as the full, absolute path. The short-form is currently defined as the last directory element of the path. The tab-bar is configurable in terms of font styling and style character (like dividers, prefixes, and postfixes). Documentation has been created in a separate file. Collateral impact: * The `tilde_in_titlebar` option for `[display]` in `joshuto.toml` has been removed. (Because the "current dir display" has been removed.) * The `display_mode` option for `[tabs]` in `joshuto.toml` has been removed and with it, also the `tab_bar_mode` command. The appearance of index-numbers in tags is not configurable anymore. Numbers are shown if and only if there are more than one tab. This feature can be re-introduced later in some other form if still desired with the new tab-bar. With the new tab-bar, this configuration option did not make sense the way it was designed. * The `max_len` option for `[tabs]` in `joshuto.toml` has been removed. (Because tabs don't have a fixed width anymore.) * The function/feature of shortening paths by replacing heading path elements with their first character only has been removed. (Because I expect that this hard-to-interpret representation of a path will rarely be beneficial, now that there is a better space utilization in the top bar.) * The "old" tab-bar configuration options have been removed. * A `AppStyleOptionsRaw` struct has been introduced to allow handling of more complex default styling logic. Each styling attribute is defined there as an `Option` to indicate if a styling option has been set by the user or not. * A `PathStyleIfSome` trait is now available in "utils" to patch ratatui styles with another, _optional_ style.
Diffstat (limited to 'config')
-rw-r--r--config/joshuto.toml1
-rw-r--r--config/theme.toml28
2 files changed, 23 insertions, 6 deletions
diff --git a/config/joshuto.toml b/config/joshuto.toml
index 9219ca0..455210d 100644
--- a/config/joshuto.toml
+++ b/config/joshuto.toml
@@ -18,7 +18,6 @@ scroll_offset = 6
show_borders = true
show_hidden = false
show_icons = true
-tilde_in_titlebar = true
# none, absolute, relative
line_number_style = "none"
diff --git a/config/theme.toml b/config/theme.toml
index c26502f..fce3633 100644
--- a/config/theme.toml
+++ b/config/theme.toml
@@ -2,12 +2,30 @@
## Tabs
##########################################
-# Inactive tabs
-[tabs.inactive]
+[tabs]
+[tabs.styles]
-# Active tabs
-[tabs.active]
-invert=true
+# Style of active tab & current directory
+[tabs.styles.active]
+bg = "light_blue"
+fg = "black"
+bold = true
+
+# Style of inactive tabs
+[tabs.styles.inactive]
+
+# Style of the left/front tab scroll tag (when tabs overflow)
+[tabs.styles.scroll_front]
+fg = "yellow"
+bold = true
+
+# Style of the right/back tab scroll tag (when tabs overflow)
+[tabs.styles.scroll_back]
+fg = "yellow"
+bold = true
+
+# There are more style options and strings to configure
+# the tab-bar theme.
##########################################
## File List - Selections