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

Added toggles for updates, battery limit, bluetooth, and printing to the Control Center. Wired default values to read from theme-state.json settings. Verified: V1.
This commit is contained in:
2026-07-06 18:20:00 +01:00
parent eecc214ca9
commit 28e21af206
6 changed files with 57 additions and 9 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" "Back")
choice=$(gum choose "Auto-commit" "Auto-timezone" "Night Light" "Updates" "Battery Limit" "Bluetooth" "Printing" "Back")
case "$choice" in
"Auto-commit")
cur=$(get_state "settings.autoCommit")
@@ -155,6 +155,47 @@ function toggles_menu() {
sleep 1
fi
;;
"Updates")
cur=$(get_state "settings.updates.enable")
if [ "$cur" = "true" ]; then
set_state "settings.updates.enable" "false"
echo "Updates checker disabled (requires rebuild)."
else
set_state "settings.updates.enable" "true"
echo "Updates checker enabled (requires rebuild)."
fi
sleep 1
;;
"Battery Limit")
limit=$(gum input --prompt "Enter battery charge limit % (or empty for default): " --placeholder "$(get_state settings.power.batteryChargeLimit)")
if [ -n "$limit" ]; then
set_state "settings.power.batteryChargeLimit" "$limit"
else
set_state "settings.power.batteryChargeLimit" "null"
fi
;;
"Bluetooth")
cur=$(get_state "settings.bluetooth.enable")
if [ "$cur" = "true" ]; then
set_state "settings.bluetooth.enable" "false"
echo "Bluetooth disabled (requires rebuild)."
else
set_state "settings.bluetooth.enable" "true"
echo "Bluetooth enabled (requires rebuild)."
fi
sleep 1
;;
"Printing")
cur=$(get_state "settings.printing.enable")
if [ "$cur" = "true" ]; then
set_state "settings.printing.enable" "false"
echo "Printing services disabled (requires rebuild)."
else
set_state "settings.printing.enable" "true"
echo "Printing services enabled (requires rebuild)."
fi
sleep 1
;;
"Back"|*) break ;;
esac
done