v3-revamp

This commit is contained in:
2026-07-06 16:29:38 +02:00
parent c2770f49ed
commit 9eff92a1bb
4 changed files with 34 additions and 38 deletions
+17 -19
View File
@@ -17,13 +17,11 @@ if [ ! -t 1 ]; then
RED="" GREEN="" YELLOW="" CYAN="" GRAY="" BOLD="" RESET=""
fi
color_yellow() { printf '%b' "$YELLOW"; }
color_cyan() { printf '%b' "$CYAN"; }
color_red() { printf '%b' "$RED"; }
color_green() { printf '%b' "$GREEN"; }
color_gray() { printf '%b' "$GRAY"; }
color_reset() { printf '%b' "$RESET"; }
color_yellow() { printf "%b%s%b\n" "$YELLOW" "$*" "$RESET"; }
color_cyan() { printf "%b%s%b\n" "$CYAN" "$*" "$RESET"; }
color_red() { printf "%b%s%b\n" "$RED" "$*" "$RESET"; }
color_green() { printf "%b%s%b\n" "$GREEN" "$*" "$RESET"; }
color_gray() { printf "%b%s%b\n" "$GRAY" "$*" "$RESET"; }
#------------------------------------------
# Use exported variables from main detection script
@@ -120,22 +118,22 @@ sudo dnf update -y
color_yellow "Detected OS / Desktop Environment / Tiling Window Manager"
echo
color_gray "Installing OS-specific packages..."
color_gray "Selected DE: $DE"
color_gray "Selected TWM: $TWM"
color_gray "Installation Level: $INSTALL_LEVEL"
color_gray "Selected DE:" "$DE"
color_gray "Selected TWM:" "$TWM"
color_gray "Installation Level:" "$INSTALL_LEVEL"
#------------------------------------------
# 4. Desktop Environment installation
#------------------------------------------
case "$DE" in
xfce|plasma|gnome)
color_yellow "Preparing to install $DE..."
color_yellow "Preparing to install" "$DE"
SCRIPT_NAME="$SCRIPT_DIR/${OS}-${DE}.sh"
if [[ -f "$SCRIPT_NAME" ]]; then
color_cyan "Running $SCRIPT_NAME..."
color_cyan "Running" "$SCRIPT_NAME"
bash "$SCRIPT_NAME"
else
color_red "Error: $SCRIPT_NAME not found!"
color_red "Error:" "$SCRIPT_NAME" "not found!"
exit 1
fi
;;
@@ -149,13 +147,13 @@ esac
#------------------------------------------
case "$TWM" in
chadwm|hyprland|niri)
color_yellow "Installing $TWM..."
color_yellow "Installing" "$TWM"
SCRIPT_NAME="$SCRIPT_DIR/${OS}-${TWM}.sh"
if [[ -f "$SCRIPT_NAME" ]]; then
color_cyan "Running $SCRIPT_NAME..."
color_cyan "Running" "$SCRIPT_NAME"
bash "$SCRIPT_NAME"
else
color_red "Error: $SCRIPT_NAME not found!"
color_red "Error:" "$SCRIPT_NAME" "not found!"
exit 1
fi
;;
@@ -169,13 +167,13 @@ esac
#------------------------------------------
case "$INSTALL_LEVEL" in
minimal|full|workstation|server)
color_cyan "Installation level: $INSTALL_LEVEL"
color_cyan "Installation level:" "$INSTALL_LEVEL"
SCRIPT_NAME="$SCRIPT_DIR/${OS}-${INSTALL_LEVEL}.sh"
if [[ -f "$SCRIPT_NAME" ]]; then
color_cyan "Running $SCRIPT_NAME..."
color_cyan "Running" "$SCRIPT_NAME"
bash "$SCRIPT_NAME"
else
color_red "Error: $SCRIPT_NAME not found!"
color_red "Error:" "$SCRIPT_NAME" "not found!"
exit 1
fi
;;