feat(system): menu parity for downstream options (slice 2)

Added pickers for terminal, keyboard layout, and auto-login to the Control Center TUI, wiring them directly to Nix defaults via theme-state.json settings. Verified: V1.
This commit is contained in:
2026-07-06 18:25:46 +01:00
parent 28e21af206
commit 7569b678db
4 changed files with 37 additions and 5 deletions

View File

@@ -122,7 +122,7 @@ function appearance_menu() {
function toggles_menu() {
while true; do
choice=$(gum choose "Auto-commit" "Auto-timezone" "Night Light" "Updates" "Battery Limit" "Bluetooth" "Printing" "Back")
choice=$(gum choose "Auto-commit" "Auto-timezone" "Night Light" "Updates" "Battery Limit" "Bluetooth" "Printing" "Terminal" "Keyboard Layout" "Auto-Login" "Back")
case "$choice" in
"Auto-commit")
cur=$(get_state "settings.autoCommit")
@@ -196,6 +196,33 @@ function toggles_menu() {
fi
sleep 1
;;
"Terminal")
term=$(gum choose "ghostty" "kitty" "alacritty" "wezterm" "foot")
if [ -n "$term" ]; then
set_state "settings.terminal" "\"$term\""
echo "Terminal set to $term (requires rebuild)."
fi
sleep 1
;;
"Keyboard Layout")
layout=$(gum input --prompt "Enter keyboard layout (e.g. us, de, es): " --placeholder "$(get_state settings.keyboard.layout | tr -d '"')")
if [ -n "$layout" ]; then
set_state "settings.keyboard.layout" "\"$layout\""
echo "Keyboard layout set to $layout (requires rebuild)."
fi
sleep 1
;;
"Auto-Login")
user=$(gum input --prompt "Enter auto-login username (or empty to disable): " --placeholder "$(get_state settings.greeter.autoLogin | tr -d '"')")
if [ -n "$user" ]; then
set_state "settings.greeter.autoLogin" "\"$user\""
echo "Auto-login set to $user (requires rebuild)."
else
set_state "settings.greeter.autoLogin" "null"
echo "Auto-login disabled (requires rebuild)."
fi
sleep 1
;;
"Back"|*) break ;;
esac
done