34 lines
1.0 KiB
Bash
Executable File
34 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
# 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=''
|
|
|
|
color_yellow() { printf '%b' "$YELLOW"; }
|
|
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}"
|
|
|
|
##########################
|
|
# Helper functions
|
|
##########################
|
|
install_packages() { sudo apt update; sudo apt install -y --no-install-recommends "$@"; }
|
|
is_package_installed() { dpkg -s "$1" &>/dev/null; }
|
|
|
|
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"
|
|
echo
|