mirror of
https://github.com/JaKooLit/Debian-Hyprland.git
synced 2025-12-21 10:20:12 +01:00
77 lines
2.2 KiB
Bash
Executable File
77 lines
2.2 KiB
Bash
Executable File
#!/bin/bash
|
|
# 💫 https://github.com/JaKooLit 💫 #
|
|
# SDDM with optional SDDM theme #
|
|
|
|
# installing with NO-recommends
|
|
sddm1=(
|
|
sddm
|
|
)
|
|
|
|
sddm2=(
|
|
qml6-module-qt5compat-graphicaleffects
|
|
qt6-declarative-dev
|
|
qt6-svg-dev
|
|
)
|
|
|
|
# login managers to attempt to disable
|
|
login=(
|
|
lightdm
|
|
gdm3
|
|
gdm
|
|
lxdm
|
|
lxdm-gtk3
|
|
)
|
|
|
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
|
# Determine the directory where the script is located
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
# Change the working directory to the parent directory of the script
|
|
PARENT_DIR="$SCRIPT_DIR/.."
|
|
cd "$PARENT_DIR" || exit 1
|
|
|
|
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
|
|
|
# Set the name of the log file to include the current date and time
|
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_sddm.log"
|
|
|
|
|
|
# Install SDDM (no-recommends)
|
|
printf "\n%s - Installing ${SKY_BLUE}SDDM and dependencies${RESET} .... \n" "${NOTE}"
|
|
for PKG1 in "${sddm1[@]}" ; do
|
|
sudo apt install --no-install-recommends -y "$PKG1" | tee -a "$LOG"
|
|
done
|
|
|
|
# Installation of additional sddm stuff
|
|
for PKG2 in "${sddm2[@]}"; do
|
|
install_package "$PKG2" "$LOG"
|
|
done
|
|
|
|
# Check if other login managers are installed and disable their service before enabling SDDM
|
|
for login_manager in "${login[@]}"; do
|
|
if sudo apt list --installed "$login_manager" > /dev/null; then
|
|
echo "Disabling $login_manager..."
|
|
sudo systemctl disable "$login_manager.service" >> "$LOG" 2>&1
|
|
echo "$login_manager disabled."
|
|
fi
|
|
done
|
|
|
|
# Double check with systemctl
|
|
for manager in "${login[@]}"; do
|
|
if systemctl is-active --quiet "$manager" > /dev/null 2>&1; then
|
|
echo "$manager is active, disabling it..." >> "$LOG" 2>&1
|
|
sudo systemctl disable "$manager" --now >> "$LOG" 2>&1
|
|
fi
|
|
done
|
|
|
|
printf "\n%.0s" {1..1}
|
|
printf "${INFO} Activating sddm service........\n"
|
|
sudo systemctl enable sddm
|
|
|
|
wayland_sessions_dir=/usr/share/wayland-sessions
|
|
[ ! -d "$wayland_sessions_dir" ] && { printf "$CAT - $wayland_sessions_dir not found, creating...\n"; sudo mkdir -p "$wayland_sessions_dir" 2>&1 | tee -a "$LOG"; }
|
|
sudo cp assets/hyprland.desktop "$wayland_sessions_dir/" 2>&1 | tee -a "$LOG"
|
|
|
|
printf "\n%.0s" {1..2}
|
|
|