From e809ccf686c171d51c609f2679a2428ce15068f5 Mon Sep 17 00:00:00 2001 From: Alex Flores Date: Fri, 18 Jul 2025 10:16:51 -0500 Subject: [PATCH] feat(config): add support for custom input prompt in user config (#648) --- .config/config.toml | 2 ++ television/channels/prototypes.rs | 3 ++ television/cli/args.rs | 10 ++++++ television/cli/mod.rs | 3 ++ television/config/mod.rs | 29 ++++++++++++++++ television/config/ui.rs | 8 +++++ television/draw.rs | 3 ++ television/main.rs | 11 ++++++ television/screen/input.rs | 9 +++-- tests/cli/cli_ui.rs | 57 +++++++++++++++++++++++++++++++ 10 files changed, 132 insertions(+), 3 deletions(-) diff --git a/.config/config.toml b/.config/config.toml index 6b80d02..341db38 100644 --- a/.config/config.toml +++ b/.config/config.toml @@ -56,6 +56,8 @@ ui_scale = 100 # Where to place the input bar in the UI (top or bottom) input_bar_position = "top" +# The input prompt string (defaults to ">" if not specified) +input_prompt = ">" # What orientation should tv be (landscape or portrait) orientation = "landscape" # The theme to use for the UI diff --git a/television/channels/prototypes.rs b/television/channels/prototypes.rs index c18af81..41be5a0 100644 --- a/television/channels/prototypes.rs +++ b/television/channels/prototypes.rs @@ -379,6 +379,8 @@ pub struct UiSpec { pub input_bar_position: Option, #[serde(default)] pub input_header: Option