From b75495c17780535b79d095755aa3d218f1f5a055 Mon Sep 17 00:00:00 2001 From: "Ja.KooLit" Date: Fri, 29 Dec 2023 17:23:42 +0900 Subject: [PATCH] switch to swaync in favor of dunst --- CHANGELOGS.md | 3 +++ README.md | 3 +++ install-scripts/00-hypr-pkgs.sh | 34 ++++++++++++++++++++++++++++++++- 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/CHANGELOGS.md b/CHANGELOGS.md index 3a74594..523d04d 100644 --- a/CHANGELOGS.md +++ b/CHANGELOGS.md @@ -1,5 +1,8 @@ ## Changelogs +## 29 December 2023 +- Remove dunst in favor of swaync. NOTE: Part of the script is to also uninstall mako and dunst (if installed) as on my experience, dunst is sometimes taking over the notification even if it is not set to start + ## 16 Dec 2023 - zsh theme switched to `agnoster` theme by default - pywal tty color change disabled by default diff --git a/README.md b/README.md index 9b96077..e7efde3 100644 --- a/README.md +++ b/README.md @@ -179,6 +179,9 @@ sudo ninja -C build install #### 🙋 Got a questions regarding the Hyprland Dots configurations? 🙋 - Head over to wiki Link [`WIKI`](https://github.com/JaKooLit/Hyprland-Dots/wiki) +#### 🙋 👋 Having issues or questions? +- for the install part, kindly open issue on this repo +- for the Pre-configured Hyprland dots / configuration, submit issue [`here`](https://github.com/JaKooLit/Hyprland-Dots/issues) #### 🛣️ Roadmap: - ~~[ ] Install zsh and oh-my-zsh without necessary steps above~~ DONE diff --git a/install-scripts/00-hypr-pkgs.sh b/install-scripts/00-hypr-pkgs.sh index c3a02bc..da9e22d 100644 --- a/install-scripts/00-hypr-pkgs.sh +++ b/install-scripts/00-hypr-pkgs.sh @@ -14,7 +14,6 @@ Extra=( # packages neeeded hypr_package=( cliphist - dunst grim gvfs gvfs-backends @@ -31,6 +30,7 @@ hypr_package=( qt5-style-kvantum-themes qt6ct slurp + sway-notification-center waybar wget wl-clipboard @@ -57,6 +57,11 @@ hypr_package_2=( wlsunset ) +# List of packages to uninstall as it conflicts with swaync or causing swaync to not function properly +uninstall=( + dunst + mako +) ############## WARNING DO NOT EDIT BEYOND THIS LINE if you dont know what you are doing! ###################################### # Determine the directory where the script is located @@ -101,6 +106,24 @@ install_package() { fi } +# Function for uninstalling packages +uninstall_package() { + # Checking if package is installed + if sudo dpkg -l | grep -q -w "$1" ; then + # Package is installed + echo -e "${NOTE} Uninstalling $1 ..." + sudo apt-get autoremove -y "$1" 2>&1 | tee -a "$LOG" + # Making sure package is uninstalled + if ! sudo dpkg -l | grep -q -w "$1" ; then + echo -e "\e[1A\e[K${OK} $1 was uninstalled." + else + # Something went wrong, exiting to review log + echo -e "\e[1A\e[K${ERROR} $1 failed to uninstall. Please check the uninstall.log." + exit 1 + fi + fi +} + # Installation of main components printf "\n%s - Installing hyprland packages.... \n" "${NOTE}" @@ -112,6 +135,15 @@ for PKG1 in "${hypr_package[@]}" "${hypr_package_2[@]}" "${Extra[@]}"; do fi done +printf "\n%s - Checking if mako or dunst are installed and removing for swaync to work properly \n" "${NOTE}" + +for PKG in "${uninstall[@]}"; do + uninstall_package "$PKG" 2>&1 | tee -a "$LOG" + if [ $? -ne 0 ]; then + echo -e "\e[1A\e[K${ERROR} - $PKG uninstallation had failed, please check the log" + exit 1 + fi +done # Install cliphist using go printf "\n%s - Installing cliphist using go.... \n" "${NOTE}"