fix: theme-Auswahl + SDDM-Theme-Correctness
Drei Probleme gefixt:
1. Theme-Auswahl waehrend Install
- apply-theme.sh zeigt jetzt alle .theme-Files via tui_choose
- Benutzer waehlt interaktiv (gum/whiptail/basic)
- Bei nur einem Theme: auto-select
2. SDDM wendet falsches Theme an
- sddm.sh erzeugt /var/lib/pascal-sddm-theme/ mit user chown
- Liest current-theme.conf + hyprpaper.conf fuer aktuelle Farben
- Schreibt theme.conf in /usr/share/sddm/themes/pascal-hypr/
- Config heisst jetzt 90-pascal-hypr.conf (hoehere Priority)
- apply-theme.sh erzeugt state dir VOR theme-menu.sh --apply
3. tui_choose basic mode fix
- ${!choice} funktioniert nicht fuer numerische Indices
- labels+=("$@") + ${labels[$choice]} statt Positional-Params
This commit is contained in:
12
lib/tui.sh
12
lib/tui.sh
@@ -71,13 +71,13 @@ tui_choose() {
|
||||
done
|
||||
whiptail --menu "$prompt" 20 60 10 "${items[@]}" 3>&1 1>&2 2>&3
|
||||
else
|
||||
local labels=("$@")
|
||||
printf '\n==============================\n'
|
||||
printf ' %s\n' "$(_strip_format "$prompt")"
|
||||
printf '==============================\n'
|
||||
local i=0
|
||||
for item in "$@"; do
|
||||
printf ' [%d] %s\n' "$i" "$item"
|
||||
((i++))
|
||||
local i
|
||||
for i in "${!labels[@]}"; do
|
||||
printf ' [%d] %s\n' "$i" "${labels[$i]}"
|
||||
done
|
||||
printf ' [x] Cancel\n'
|
||||
printf '==============================\n'
|
||||
@@ -86,8 +86,8 @@ tui_choose() {
|
||||
if [[ "$choice" == "x" ]]; then
|
||||
return 1
|
||||
fi
|
||||
if [[ "$choice" =~ ^[0-9]+$ ]] && ((choice < ${#@})); then
|
||||
printf '%s\n' "${!choice}"
|
||||
if [[ "$choice" =~ ^[0-9]+$ ]] && ((choice < ${#labels[@]})); then
|
||||
printf '%s\n' "${labels[$choice]}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user