updated debian scripts

This commit is contained in:
[yuri]
2025-11-10 12:50:37 +01:00
parent 60a4c9f906
commit 542cf935cd
8 changed files with 244 additions and 579 deletions

View File

@@ -1,44 +1,32 @@
#!/bin/bash
set -euo pipefail
##########################
# Color helpers (no tput)
##########################
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
CYAN='\033[0;36m'
GRAY='\033[0;37m'
BOLD='\033[1m'
RESET='\033[0m'
# Colors + logging same pattern
RED='\033[0;31m'; GREEN='\033[0;32m'; YELLOW='\033[0;33m'
CYAN='\033[0;36m'; GRAY='\033[0;37m'; BOLD='\033[1m'; RESET='\033[0m'
[ ! -t 1 ] && RED='' GREEN='' YELLOW='' CYAN='' GRAY='' BOLD='' RESET=''
# Disable colors if output is not a terminal
if [ ! -t 1 ]; then
RED='' GREEN='' YELLOW='' CYAN='' GRAY='' BOLD='' RESET=''
fi
color_red() { printf '%b' "$RED"; }
color_green() { printf '%b' "$GREEN"; }
color_yellow() { printf '%b' "$YELLOW"; }
color_cyan() { printf '%b' "$CYAN"; }
color_gray() { printf '%b' "$GRAY"; }
color_reset() { printf '%b' "$RESET"; }
color_green() { printf '%b' "$GREEN"; }
color_reset() { printf '%b' "$RESET"; }
LOGFILE="${LOGFILE:-/tmp/debian-hyprland.log}"
exec > >(tee -a "$LOGFILE") 2>&1
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
OS="${DETECTED_OS:-debian}"
##########################
# Use exported variables from main detection script
# Helper functions
##########################
OS="${DETECTED_OS}"
DDE="${DETECTED_DE}"
DE="${SELECTED_DE:-none}"
TWM="${SELECTED_TWM:-none}"
INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}"
install_packages() { sudo apt update; sudo apt install -y --no-install-recommends "$@"; }
is_package_installed() { dpkg -s "$1" &>/dev/null; }
color_cyan
echo
echo "Starting Debian Hyprland setup..."
color_reset
echo "DE: $DE, TWM: $TWM, Install Level: $INSTALL_LEVEL"
echo
color_yellow; echo "Starting hyprland setup..."; color_reset
# Optionally add hyprland-specific packages here
#install_packages ????
color_green; echo "hyprland setup completed."; color_reset
# Pause
read -n 1 -s -r -p "Press any key to continue"