From 4c2d8201dccdf8571a71a6e969ca9557b1c5fdf2 Mon Sep 17 00:00:00 2001 From: P T Weir Date: Mon, 7 Oct 2024 16:54:07 +0100 Subject: 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 --- crates/atuin-client/src/settings.rs | 2 ++ crates/atuin-client/src/theme.rs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'crates/atuin-client/src') 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, -- cgit v1.3.1