aboutsummaryrefslogtreecommitdiffstats
path: root/crates/atuin-client
diff options
context:
space:
mode:
authorP T Weir <phil.weir@flaxandteal.co.uk>2024-10-07 16:54:07 +0100
committerGitHub <noreply@github.com>2024-10-07 08:54:07 -0700
commit4c2d8201dccdf8571a71a6e969ca9557b1c5fdf2 (patch)
tree79e2a5827224f36ec3a5edab65c9def087f22b4d /crates/atuin-client
parentfix(deps): pin tiny_bip to 1.0.0 until breaking change resolved (#2412) (diff)
downloadatuin-4c2d8201dccdf8571a71a6e969ca9557b1c5fdf2.zip
feat: Ultracompact Mode (search-only) (#2357)
* feat: add always_show_tabs setting * feat(ultracompact): extra-compact options * feat(ultracompact): enable via auto_hide_height * feat(ultracompact): clarify comment * fix(theming): minor tidyup to theming comment * chore: rustfmt/clippy corrections * chore: testing if CI issue was transient
Diffstat (limited to 'crates/atuin-client')
-rw-r--r--crates/atuin-client/config.toml7
-rw-r--r--crates/atuin-client/src/settings.rs2
-rw-r--r--crates/atuin-client/src/theme.rs4
3 files changed, 11 insertions, 2 deletions
diff --git a/crates/atuin-client/config.toml b/crates/atuin-client/config.toml
index 9cd833aa..4b2810e5 100644
--- a/crates/atuin-client/config.toml
+++ b/crates/atuin-client/config.toml
@@ -125,6 +125,13 @@
## Configure whether or not to show tabs for search and inspect
# show_tabs = true
+## Configure whether or not the tabs row may be auto-hidden, which includes the current Atuin
+## tab, such as Search or Inspector, and other tabs you may wish to see. This will
+## only be hidden if there are fewer than this count of lines available, and does not affect the use
+## of keyboard shortcuts to switch tab. 0 to never auto-hide, default is 8 (lines).
+## This is ignored except in `compact` mode.
+# auto_hide_height = 8
+
## Defaults to true. This matches history against a set of default regex, and will not save it if we get a match. Defaults include
## 1. AWS key id
## 2. Github pat (old and new)
diff --git a/crates/atuin-client/src/settings.rs b/crates/atuin-client/src/settings.rs
index 5fa319e7..efbdb33d 100644
--- a/crates/atuin-client/src/settings.rs
+++ b/crates/atuin-client/src/settings.rs
@@ -440,6 +440,7 @@ pub struct Settings {
pub max_preview_height: u16,
pub show_help: bool,
pub show_tabs: bool,
+ pub auto_hide_height: u16,
pub exit_mode: ExitMode,
pub keymap_mode: KeymapMode,
pub keymap_mode_shell: KeymapMode,
@@ -722,6 +723,7 @@ impl Settings {
.set_default("max_preview_height", 4)?
.set_default("show_help", true)?
.set_default("show_tabs", true)?
+ .set_default("auto_hide_height", 8)?
.set_default("invert", false)?
.set_default("exit_mode", "return-original")?
.set_default("word_jump_mode", "emacs")?
diff --git a/crates/atuin-client/src/theme.rs b/crates/atuin-client/src/theme.rs
index d45f1e9d..9ebe6f9c 100644
--- a/crates/atuin-client/src/theme.rs
+++ b/crates/atuin-client/src/theme.rs
@@ -53,8 +53,8 @@ pub struct ThemeDefinitionConfigBlock {
use crossterm::style::{Color, ContentStyle};
-// For now, a theme is specifically a mapping of meanings to colors, but it may be desirable to
-// expand that in the future to general styles.
+// For now, a theme is loaded as a mapping of meanings to colors, but it may be desirable to
+// expand that in the future to general styles, so we populate a Meaning->ContentStyle hashmap.
pub struct Theme {
pub name: String,
pub parent: Option<String>,