setup: move DE selection to its own TUI screen
Remove the 'de' checkbox from the component checklist and always show the desktop environment menu as a dedicated step between component and app selection. Choosing 'none' or pressing Esc skips DE installation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>main
parent
9cde41ddde
commit
32a84e8edf
|
|
@ -93,7 +93,7 @@ count_steps() {
|
|||
[[ "$c" == *"core"* ]] && TOTAL=$(( TOTAL + 1 ))
|
||||
[[ "$c" == *"svc"* ]] && TOTAL=$(( TOTAL + 1 ))
|
||||
[[ "$c" == *"shell"* ]] && TOTAL=$(( TOTAL + 1 ))
|
||||
[[ "$c" == *"de"* && "$de" != "none" ]] && TOTAL=$(( TOTAL + 1 ))
|
||||
[[ "$de" != "none" ]] && TOTAL=$(( TOTAL + 1 ))
|
||||
[[ "$a" == *"ollama"* ]] && TOTAL=$(( TOTAL + 1 ))
|
||||
[[ "$a" == *"llama-cpp"* ]] && TOTAL=$(( TOTAL + 1 ))
|
||||
[[ "$a" == *"open-webui"* ]] && TOTAL=$(( TOTAL + 1 ))
|
||||
|
|
@ -162,20 +162,17 @@ dialog --backtitle "$BACKTITLE" \
|
|||
# ── Component selection ───────────────────────────────────────────────────────
|
||||
COMPONENTS=$(dialog --backtitle "$BACKTITLE" \
|
||||
--title " Select Components " \
|
||||
--checklist "Space toggles · Enter confirms · Esc quits" 16 68 5 \
|
||||
--checklist "Space toggles · Enter confirms · Esc quits" 15 68 4 \
|
||||
"pkg" "Package managers yay · nvm · rust" on \
|
||||
"core" "Core packages 100+ base system packages" on \
|
||||
"svc" "Core services NetworkManager · cronie · fail2ban" on \
|
||||
"shell" "Shell setup zsh · nvim · yazi · micro · starship" on \
|
||||
"de" "Desktop environment (choose on next screen)" off \
|
||||
3>&1 1>&2 2>&3) || { clear; echo "Aborted."; exit 0; }
|
||||
|
||||
# ── DE selection ──────────────────────────────────────────────────────────────
|
||||
DE="none"
|
||||
if [[ "$COMPONENTS" == *"de"* ]]; then
|
||||
DE=$(dialog --backtitle "$BACKTITLE" \
|
||||
--title " Desktop Environment " \
|
||||
--menu "Select a desktop environment:" 20 70 8 \
|
||||
--menu "Select a desktop environment · Esc / none to skip:" 20 70 8 \
|
||||
"hyprland" "Hyprland — Wayland WM, full setup (primary)" \
|
||||
"sway" "Sway — Wayland tiling WM" \
|
||||
"kde-plasma" "KDE Plasma — feature-rich Wayland/X11 DE" \
|
||||
|
|
@ -185,7 +182,6 @@ if [[ "$COMPONENTS" == *"de"* ]]; then
|
|||
"lxqt" "LXQt — lightweight Qt X11 DE" \
|
||||
"none" "Skip DE installation" \
|
||||
3>&1 1>&2 2>&3) || DE="none"
|
||||
fi
|
||||
|
||||
# ── Apps selection ────────────────────────────────────────────────────────────
|
||||
SELECTED_APPS=$(dialog --backtitle "$BACKTITLE" \
|
||||
|
|
@ -240,7 +236,7 @@ SUMMARY=""
|
|||
[[ "$COMPONENTS" == *"core"* ]] && SUMMARY+=" ✦ Core packages\n"
|
||||
[[ "$COMPONENTS" == *"svc"* ]] && SUMMARY+=" ✦ Core services\n"
|
||||
[[ "$COMPONENTS" == *"shell"* ]] && SUMMARY+=" ✦ Shell setup\n"
|
||||
[[ "$COMPONENTS" == *"de"* && "$DE" != "none" ]] && SUMMARY+=" ✦ Desktop environment: $DE\n"
|
||||
[[ "$DE" != "none" ]] && SUMMARY+=" ✦ Desktop environment: $DE\n"
|
||||
|
||||
if [[ -n "$SELECTED_APPS" ]]; then
|
||||
SUMMARY+="\n Applications:\n"
|
||||
|
|
@ -300,7 +296,7 @@ count_steps "$COMPONENTS" "$DE" "$SELECTED_APPS"
|
|||
[[ "$COMPONENTS" == *"svc"* ]] && run_module "Core Services" "$MODULES/core.sh"
|
||||
[[ "$COMPONENTS" == *"shell"* ]] && run_module "Shell Setup" "$MODULES/shell-setup.sh"
|
||||
|
||||
if [[ "$COMPONENTS" == *"de"* && "$DE" != "none" ]]; then
|
||||
if [[ "$DE" != "none" ]]; then
|
||||
case "$DE" in
|
||||
hyprland) run_module "Hyprland" "$MODULES/Desktop-Environments/hyprland.sh" ;;
|
||||
sway) run_module "Sway" "$MODULES/Desktop-Environments/sway.sh" ;;
|
||||
|
|
|
|||
Loading…
Reference in New Issue