From 9104834d7f98da87006f544fdf6772796f909e26 Mon Sep 17 00:00:00 2001 From: Stephan Raabe Date: Tue, 27 Feb 2024 14:54:19 +0100 Subject: [PATCH] Updates --- .install/packages/hyprland-packages.sh | 2 ++ .install/remove.sh | 21 +++++++++++++++++ .install/screenlock.sh | 32 -------------------------- install.sh | 2 +- 4 files changed, 24 insertions(+), 33 deletions(-) create mode 100755 .install/remove.sh delete mode 100755 .install/screenlock.sh diff --git a/.install/packages/hyprland-packages.sh b/.install/packages/hyprland-packages.sh index 5f09eac..80b9e72 100644 --- a/.install/packages/hyprland-packages.sh +++ b/.install/packages/hyprland-packages.sh @@ -13,4 +13,6 @@ packagesYay=( "wlogout" "nwg-look" "emote" + "hypridle" + "hyprlock" ); diff --git a/.install/remove.sh b/.install/remove.sh new file mode 100755 index 0000000..5f27473 --- /dev/null +++ b/.install/remove.sh @@ -0,0 +1,21 @@ +#!/bin/bash +if [[ $(_isInstalledYay "hypridle-git") == 0 ]]; then + yay --noconfirm -Rns hypridle-git + if [ -f /usr/lib/debug/usr/bin/hypridle.debug ] ;then + sudo rm /usr/lib/debug/usr/bin/hypridle.debug + echo ":: /usr/lib/debug/usr/bin/hypridle.debug removed" + fi + echo ":: hypridle-git uninstalled." + echo ":: hypridle can now be installed." + echo +fi +if [[ $(_isInstalledYay "hyprlock-git") == 0 ]]; then + yay --noconfirm -Rns hyprlock-git + if [ -f /usr/lib/debug/usr/bin/hyprlock.debug ] ;then + sudo rm /usr/lib/debug/usr/bin/hyprlock.debug + echo ":: /usr/lib/debug/usr/bin/hyprlock.debug removed" + fi + echo ":: hyprlock-git uninstalled." + echo ":: hyprlock can now be installed." +fi +echo \ No newline at end of file diff --git a/.install/screenlock.sh b/.install/screenlock.sh deleted file mode 100755 index e0cb5a7..0000000 --- a/.install/screenlock.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -echo -e "${GREEN}" -figlet "Screen lock" -echo -e "${NONE}" -if [[ $(_isInstalledYay "hypridle-git") == 1 ]] || [[ $(_isInstalledYay "hyprlock-git") == 1 ]]; then - echo "You can install hypridle and hyprlock to lock your screen automatically." - echo "These are the new standard screen locking packages of the ML4W dotfiles." - echo "Screenlocking will not work anymore if you keep swaylock." - echo "The installation is highly recommended." - if gum confirm "Do you want to install hypridle and hyprlock?" ;then - - # Install Hypridle and Hyprlock - yay --noconfirm -S hypridle-git hyprlock-git - - # Remove Swayidle - if [[ $(_isInstalledPacman "swayidle") == 0 ]]; then - sudo pacman --noconfirm -Rns swayidle - fi - - # Remove Swaylock - if [[ $(_isInstalledYay "swaylock-effects-git") == 0 ]]; then - yay --noconfirm -Rns swaylock-effects-git - fi - - fi -else - echo ":: hypridle and hyprlock are already installed." - if gum confirm "Do you want to force a reinstallation to get the latest versions?" ;then - yay --noconfirm -S hypridle-git hyprlock-git - fi -fi -echo \ No newline at end of file diff --git a/install.sh b/install.sh index 6f9459c..8594213 100755 --- a/install.sh +++ b/install.sh @@ -40,6 +40,7 @@ source .install/backup.sh source .install/preparation.sh source .install/installer.sh source .install/general.sh +source .install/remove.sh source .install/packages/general-packages.sh source .install/install-packages.sh source .install/profile.sh @@ -49,7 +50,6 @@ if [[ $profile == *"Hyprland"* ]]; then echo -e "${NONE}" source .install/packages/hyprland-packages.sh source .install/install-packages.sh - source .install/screenlock.sh fi if [[ $profile == *"Qtile"* ]]; then echo -e "${GREEN}"