This commit is contained in:
Stephan Raabe 2024-02-27 14:54:19 +01:00
parent 30913d6938
commit 9104834d7f
4 changed files with 24 additions and 33 deletions

View File

@ -13,4 +13,6 @@ packagesYay=(
"wlogout"
"nwg-look"
"emote"
"hypridle"
"hyprlock"
);

21
.install/remove.sh Executable file
View File

@ -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

View File

@ -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

View File

@ -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}"