mirror of
https://github.com/JaKooLit/Debian-Hyprland.git
synced 2025-12-21 18:20:13 +01:00
Compare commits
No commits in common. "9ce8e591fe89c749c531f637ec3c6188483b0127" and "9dc1f170468468f075bdfd42fea141d004cfc680" have entirely different histories.
9ce8e591fe
...
9dc1f17046
@ -1,8 +1,5 @@
|
|||||||
## CHANGELOGS
|
## CHANGELOGS
|
||||||
|
|
||||||
## 11 March 2025
|
|
||||||
- Added uninstall script
|
|
||||||
|
|
||||||
## 10 March 2025
|
## 10 March 2025
|
||||||
- Dropped pyprland in favor of hyprland built in tool for a drop down like terminal and Desktop magnifier
|
- Dropped pyprland in favor of hyprland built in tool for a drop down like terminal and Desktop magnifier
|
||||||
|
|
||||||
|
|||||||
@ -68,11 +68,6 @@ https://github.com/user-attachments/assets/49bc12b2-abaf-45de-a21c-67aacd9bb872
|
|||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> Main reason why I have not included an uninstallation script is simple. Some packages maybe already installed on your system by default. If I create an uninstall script with packages that I have set to install, you may end up a unrecoverable system.
|
> Main reason why I have not included an uninstallation script is simple. Some packages maybe already installed on your system by default. If I create an uninstall script with packages that I have set to install, you may end up a unrecoverable system.
|
||||||
|
|
||||||
### 💥 💥 UNINSTALL SCRIPT / Removal of Config Files
|
|
||||||
- 11 March 2025, due to popular request, created a guided `uninstall.sh` script. USE this with caution as it may render your system unstable.
|
|
||||||
- I will not be responsible if your system breaks
|
|
||||||
- The best still to revert to previous state of your system is via timeshift of snapper
|
|
||||||
|
|
||||||
> [!CAUTION]
|
> [!CAUTION]
|
||||||
> Download this script on a directory where you have write permissions. ie. HOME. Or any directory within your home directory. Else script will fail
|
> Download this script on a directory where you have write permissions. ie. HOME. Or any directory within your home directory. Else script will fail
|
||||||
|
|
||||||
|
|||||||
@ -52,30 +52,28 @@ done
|
|||||||
|
|
||||||
# Check if other login managers are installed and disable their service before enabling SDDM
|
# Check if other login managers are installed and disable their service before enabling SDDM
|
||||||
for login_manager in "${login[@]}"; do
|
for login_manager in "${login[@]}"; do
|
||||||
if dpkg -l | grep -q "^ii $login_manager"; then
|
if sudo apt list --installed "$login_manager" > /dev/null; then
|
||||||
echo "Disabling $login_manager..."
|
echo "Disabling $login_manager..."
|
||||||
sudo systemctl disable "$login_manager.service" >> "$LOG" 2>&1 || echo "Failed to disable $login_manager" >> "$LOG"
|
sudo systemctl disable "$login_manager.service" >> "$LOG" 2>&1
|
||||||
echo "$login_manager disabled."
|
echo "$login_manager disabled."
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Double check with systemctl
|
# Double check with systemctl
|
||||||
for manager in "${login[@]}"; do
|
for manager in "${login[@]}"; do
|
||||||
if systemctl is-active --quiet "$manager.service" > /dev/null 2>&1; then
|
if systemctl is-active --quiet "$manager" > /dev/null 2>&1; then
|
||||||
echo "$manager.service is active, disabling it..." >> "$LOG" 2>&1
|
echo "$manager is active, disabling it..." >> "$LOG" 2>&1
|
||||||
sudo systemctl disable "$manager.service" --now >> "$LOG" 2>&1 || echo "Failed to disable $manager.service" >> "$LOG"
|
sudo systemctl disable "$manager" --now >> "$LOG" 2>&1
|
||||||
else
|
|
||||||
echo "$manager.service is not active" >> "$LOG" 2>&1
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
printf "\n%.0s" {1..1}
|
printf "\n%.0s" {1..1}
|
||||||
printf "${INFO} Activating sddm service........\n"
|
printf "${INFO} Activating sddm service........\n"
|
||||||
sudo systemctl set-default graphical.target 2>&1 | tee -a "$LOG"
|
sudo systemctl enable sddm
|
||||||
sudo systemctl enable sddm.service 2>&1 | tee -a "$LOG"
|
|
||||||
|
|
||||||
wayland_sessions_dir=/usr/share/wayland-sessions
|
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"; }
|
[ ! -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"
|
sudo cp assets/hyprland.desktop "$wayland_sessions_dir/" 2>&1 | tee -a "$LOG"
|
||||||
|
|
||||||
printf "\n%.0s" {1..2}
|
printf "\n%.0s" {1..2}
|
||||||
|
|
||||||
|
|||||||
@ -88,7 +88,7 @@ sleep 1
|
|||||||
printf "\n%.0s" {1..1}
|
printf "\n%.0s" {1..1}
|
||||||
|
|
||||||
# install pciutils if detected not installed. Necessary for detecting GPU
|
# install pciutils if detected not installed. Necessary for detecting GPU
|
||||||
if ! dpkg -l | grep -w pciutils > /dev/null; then
|
if ! zypper se -i pciutils > /dev/null; then
|
||||||
echo "pciutils is not installed. Installing..." | tee -a "$LOG"
|
echo "pciutils is not installed. Installing..." | tee -a "$LOG"
|
||||||
sudo apt install -y pciutils
|
sudo apt install -y pciutils
|
||||||
printf "\n%.0s" {1..1}
|
printf "\n%.0s" {1..1}
|
||||||
|
|||||||
260
uninstall.sh
260
uninstall.sh
@ -1,260 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# 💫 https://github.com/JaKooLit 💫 #
|
|
||||||
# KooL Debian-Hyprland uninstall script #
|
|
||||||
|
|
||||||
clear
|
|
||||||
|
|
||||||
# Set some colors for output messages
|
|
||||||
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
|
||||||
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
|
||||||
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
|
||||||
INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
|
|
||||||
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
|
|
||||||
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
|
||||||
MAGENTA="$(tput setaf 5)"
|
|
||||||
ORANGE="$(tput setaf 214)"
|
|
||||||
WARNING="$(tput setaf 1)"
|
|
||||||
YELLOW="$(tput setaf 3)"
|
|
||||||
GREEN="$(tput setaf 2)"
|
|
||||||
BLUE="$(tput setaf 4)"
|
|
||||||
SKY_BLUE="$(tput setaf 6)"
|
|
||||||
RESET="$(tput sgr0)"
|
|
||||||
|
|
||||||
printf "\n%.0s" {1..2}
|
|
||||||
echo -e "\e[35m
|
|
||||||
╦╔═┌─┐┌─┐╦ ╦ ╦┬ ┬┌─┐┬─┐┬ ┌─┐┌┐┌┌┬┐
|
|
||||||
╠╩╗│ ││ │║ ╠═╣└┬┘├─┘├┬┘│ ├─┤│││ ││ UNINSTALL
|
|
||||||
╩ ╩└─┘└─┘╩═╝ ╩ ╩ ┴ ┴ ┴└─┴─┘┴ ┴┘└┘─┴┘ Debian
|
|
||||||
\e[0m"
|
|
||||||
printf "\n%.0s" {1..1}
|
|
||||||
|
|
||||||
# Show welcome message using whiptail with Yes/No options
|
|
||||||
whiptail --title "Debian-Hyprland KooL Dots Uninstall Script" --yesno \
|
|
||||||
"Hello! This script will uninstall KooL Hyprland packages and configs.
|
|
||||||
|
|
||||||
You can choose packages and directories you want to remove.
|
|
||||||
NOTE: This will remove configs from ~/.config
|
|
||||||
|
|
||||||
WARNING: After uninstallation, your system may become unstable.
|
|
||||||
|
|
||||||
Shall we Proceed?" 20 80
|
|
||||||
|
|
||||||
if [ $? -eq 1 ]; then
|
|
||||||
echo "$INFO uninstall process canceled."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Function to remove selected packages on Debian/Ubuntu
|
|
||||||
remove_packages() {
|
|
||||||
local selected_packages_file=$1
|
|
||||||
while read -r package; do
|
|
||||||
# Check if the package is installed using dpkg (apt's underlying tool)
|
|
||||||
if dpkg -l | grep -q "^ii $package "; then
|
|
||||||
echo "Removing package: $package"
|
|
||||||
if ! sudo apt remove -y "$package"; then
|
|
||||||
echo "$ERROR Failed to remove package: $package"
|
|
||||||
else
|
|
||||||
echo "$OK Successfully removed package: $package"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "$INFO Package ${YELLOW}$package${RESET} not found. Skipping."
|
|
||||||
fi
|
|
||||||
done < "$selected_packages_file"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Function to remove selected directories
|
|
||||||
remove_directories() {
|
|
||||||
local selected_dirs_file=$1
|
|
||||||
while read -r dir; do
|
|
||||||
if [ -d "$HOME/.config/$dir" ]; then
|
|
||||||
echo "Removing directory: $HOME/.config/$dir"
|
|
||||||
if ! rm -rf "$HOME/.config/$dir"; then
|
|
||||||
echo "$ERROR Failed to remove directory: $HOME/.config/$dir"
|
|
||||||
else
|
|
||||||
echo "$OK Successfully removed directory: $HOME/.config/$dir"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "$INFO Directory ${YELLOW}$HOME/.config/$dir${RESET} not found. Skipping."
|
|
||||||
fi
|
|
||||||
done < "$selected_dirs_file"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Define the list of packages to choose from (with options_command tags)
|
|
||||||
packages=(
|
|
||||||
"btop" "resource monitor" "off"
|
|
||||||
"brightnessctl" "brightnessctl" "off"
|
|
||||||
"cava" "Cross-platform Audio Visualizer" "off"
|
|
||||||
"cliphist" "clipboard manager" "off"
|
|
||||||
"fastfetch" "fastfetch" "off"
|
|
||||||
"ffmpegthumbnailer" "FFmpeg Thumbnailer" "off"
|
|
||||||
"grim" "screenshot tool" "off"
|
|
||||||
"hypridle" "hyprland idling agent" "off"
|
|
||||||
"hyprland" "hyprland main package" "off"
|
|
||||||
"hyprlock" "lockscreen" "off"
|
|
||||||
"polkit-kde-agent-1" "polkit agent" "off"
|
|
||||||
"imagemagick" "imagemagick" "off"
|
|
||||||
"inxi" "CLI system information" "off"
|
|
||||||
"jq" "json data" "off"
|
|
||||||
"kitty" "kitty-terminal" "off"
|
|
||||||
"qt5-style-kvantum" "QT apps theming" "off"
|
|
||||||
"qt5-style-kvantum-themes" "QT apps theming" "off"
|
|
||||||
"mousepad" "simple text editor" "off"
|
|
||||||
"mpv" "multi-media player" "off"
|
|
||||||
"mpv-mpris" "mpv-plugin" "off"
|
|
||||||
"nvtop" "gpu resource monitor" "off"
|
|
||||||
"nwg-displays" "display monitor configuration app" "off"
|
|
||||||
"nwg-look" "gtk settings app" "off"
|
|
||||||
"pamixer" "pamixer" "off"
|
|
||||||
"pokemon-colorscripts-git" "terminal colorscripts" "off"
|
|
||||||
"pavucontrol" "pavucontrol" "off"
|
|
||||||
"pipewire-alsa" "pipewire-alsa" "off"
|
|
||||||
"playerctl" "playerctl" "off"
|
|
||||||
"qalculate-gtk" "calculater - QT" "off"
|
|
||||||
"qt5ct" "qt5ct" "off"
|
|
||||||
"qt6-svg" "qt6-svg" "off"
|
|
||||||
"qt6ct" "qt6ct" "off"
|
|
||||||
"slurp" "screenshot tool" "off"
|
|
||||||
"swappy" "screenshot tool" "off"
|
|
||||||
"sway-notification-center" "notification agent" "off"
|
|
||||||
"swww" "wallpaper engine" "off"
|
|
||||||
"thunar" "File Manager" "off"
|
|
||||||
"thunar-archive-plugin" "Archive Plugin" "off"
|
|
||||||
"thunar-volman" "Volume Management" "off"
|
|
||||||
"tumbler" "Thumbnail Service" "off"
|
|
||||||
"unzip" "unzip" "off"
|
|
||||||
"wallust" "color pallete generator" "off"
|
|
||||||
"waybar" "wayland bar" "off"
|
|
||||||
"wl-clipboard" "clipboard manager" "off"
|
|
||||||
"wlogout" "logout menu" "off"
|
|
||||||
"xdg-desktop-portal-hyprland" "hyprland file picker" "off"
|
|
||||||
"yad" "dialog box" "off"
|
|
||||||
"yt-dlp" "video downloader" "off"
|
|
||||||
"xarchiver" "Archive Manager" "off"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Define the list of directories to choose from (with options_command tags)
|
|
||||||
directories=(
|
|
||||||
"ags" "AGS desktop overview configuration" "off"
|
|
||||||
"btop" "btop configuration" "off"
|
|
||||||
"cava" "cava configuration" "off"
|
|
||||||
"fastfetch" "fastfetch configuration" "off"
|
|
||||||
"hypr" "main hyprland configuration" "off"
|
|
||||||
"kitty" "kitty terminal configuration" "off"
|
|
||||||
"Kvantum" "Kvantum-manager configuration" "off"
|
|
||||||
"qt5ct" "qt5ct configuration" "off"
|
|
||||||
"qt6ct" "qt6ct configuration" "off"
|
|
||||||
"rofi" "rofi configuration" "off"
|
|
||||||
"swappy" "swappy (screenshot tool) configuration" "off"
|
|
||||||
"swaync" "swaync (notification agent) configuration" "off"
|
|
||||||
"Thunar" "Thunar file manager configuration" "off"
|
|
||||||
"wallust" "wallust (color pallete) configuration" "off"
|
|
||||||
"waybar" "waybar configuration" "off"
|
|
||||||
"wlogout" "wlogout (logout menu) configuration" "off"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Loop for package selection until user selects something or cancels
|
|
||||||
while true; do
|
|
||||||
package_choices=$(whiptail --title "Select Packages to Uninstall" --checklist \
|
|
||||||
"Select the packages you want to remove\nNOTE: 'SPACEBAR' to select & 'TAB' key to change selection" 35 90 25 \
|
|
||||||
"${packages[@]}" 3>&1 1>&2 2>&3)
|
|
||||||
|
|
||||||
# Check if the user canceled the operation
|
|
||||||
if [ $? -eq 1 ]; then
|
|
||||||
echo "$INFO uninstall process canceled."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If no packages are selected, ask again
|
|
||||||
if [[ -z "$package_choices" ]]; then
|
|
||||||
echo "$NOTE No packages selected. Please select at least one package."
|
|
||||||
else
|
|
||||||
echo "$package_choices" | tr -d '"' | tr ' ' '\n' > /tmp/selected_packages.txt
|
|
||||||
echo "Packages to remove: $package_choices"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Loop for directory selection until user selects something or cancels
|
|
||||||
while true; do
|
|
||||||
dir_choices=$(whiptail --title "Select Directories to Remove" --checklist \
|
|
||||||
"Select the directories you want to remove\nNOTE: This will remove configs from ~/.config\n\nNOTE: 'SPACEBAR' to select & 'TAB' key to change selection" 28 90 18 \
|
|
||||||
"${directories[@]}" 3>&1 1>&2 2>&3)
|
|
||||||
|
|
||||||
# Check if the user canceled the operation
|
|
||||||
if [ $? -eq 1 ]; then
|
|
||||||
echo "$INFO uninstall process canceled."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If no directories are selected, ask again
|
|
||||||
if [[ -z "$dir_choices" ]]; then
|
|
||||||
echo "$NOTE No directories selected. Please select at least one directory."
|
|
||||||
else
|
|
||||||
# Save each selected directory to a new line in the temporary file
|
|
||||||
echo "$dir_choices" | tr -d '"' | tr ' ' '\n' > /tmp/selected_directories.txt
|
|
||||||
echo "Directories to remove: $dir_choices"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# First confirmation - Warning about potential instability
|
|
||||||
if ! whiptail --title "Warning" --yesno \
|
|
||||||
"Warning: Removing these packages and directories may cause your system to become unstable and you may not be able to recover it.\n\nAre you sure you want to proceed?" \
|
|
||||||
10 80; then
|
|
||||||
echo "$INFO uninstall process canceled."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Second confirmation - Final confirmation to proceed
|
|
||||||
if ! whiptail --title "Final Confirmation" --yesno \
|
|
||||||
"Are you absolutely sure you want to remove the selected packages and directories?\n\nWARNING! This action is irreversible." \
|
|
||||||
10 80; then
|
|
||||||
echo "$INFO uninstall process canceled."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
printf "\n%.0s" {1..1}
|
|
||||||
printf "\n%s${SKY_BLUE}Attempting to remove selected packages${RESET}\n" "${NOTE}"
|
|
||||||
MAX_ATTEMPTS=2
|
|
||||||
ATTEMPT=0
|
|
||||||
|
|
||||||
while [ $ATTEMPT -lt $MAX_ATTEMPTS ]; do
|
|
||||||
# Remove packages
|
|
||||||
remove_packages /tmp/selected_packages.txt
|
|
||||||
|
|
||||||
# Check if any packages still need to be removed, retry if needed
|
|
||||||
MISSING_PACKAGE_COUNT=0
|
|
||||||
while read -r package; do
|
|
||||||
if dpkg -l | grep -q "^ii $package "; then
|
|
||||||
MISSING_PACKAGE_COUNT=$((MISSING_PACKAGE_COUNT + 1))
|
|
||||||
fi
|
|
||||||
done < /tmp/selected_packages.txt
|
|
||||||
|
|
||||||
if [ $MISSING_PACKAGE_COUNT -gt 0 ]; then
|
|
||||||
ATTEMPT=$((ATTEMPT + 1))
|
|
||||||
echo "Attempt #$ATTEMPT failed, retrying..."
|
|
||||||
else
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
printf "\n%.0s" {1..1}
|
|
||||||
printf "\n%s${SKY_BLUE}Attempting to remove locally installed packages${RESET}\n" "${NOTE}"
|
|
||||||
for file in ags hypridle hyprlock pokemon-colorscripts rofi wallust; do
|
|
||||||
if [ -f "/usr/local/bin/$file" ]; then
|
|
||||||
sudo rm "/usr/local/bin/$file"
|
|
||||||
echo "$file removed."
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
printf "\n%.0s" {1..1}
|
|
||||||
printf "\n%s${SKY_BLUE}Attempting to remove selected directories${RESET}\n" "${NOTE}"
|
|
||||||
remove_directories /tmp/selected_directories.txt
|
|
||||||
|
|
||||||
printf "\n%.0s" {1..1}
|
|
||||||
echo -e "$MAGENTA Hyprland and related components have been uninstalled.$RESET"
|
|
||||||
echo -e "$YELLOW It is recommended to reboot your system now.$RESET"
|
|
||||||
printf "\n%.0s" {1..1}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user