2024-02-23 14:39:01 +00:00
|
|
|
#!/bin/bash
|
|
|
|
echo -e "${GREEN}"
|
|
|
|
figlet "Screen lock"
|
|
|
|
echo -e "${NONE}"
|
|
|
|
if [[ $(_isInstalledYay "hypridle-git") == 1 ]] || [[ $(_isInstalledYay "hyprlock-git") == 1 ]]; then
|
2024-02-23 15:03:57 +00:00
|
|
|
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."
|
2024-02-23 14:39:01 +00:00
|
|
|
if gum confirm "Do you want to install hypridle and hyprlock?" ;then
|
2024-02-23 15:03:57 +00:00
|
|
|
|
|
|
|
# Install Hypridle and Hyprlock
|
2024-02-23 14:39:01 +00:00
|
|
|
yay --noconfirm -S hypridle-git hyprlock-git
|
2024-02-23 15:03:57 +00:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2024-02-23 14:39:01 +00:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo ":: hypridle and hyprlock are already installed."
|
2024-02-23 16:13:14 +00:00
|
|
|
if gum confirm "Do you want to force a reinstallation to get the latest versions?" ;then
|
|
|
|
yay --noconfirm -S hypridle-git hyprlock-git
|
|
|
|
fi
|
2024-02-23 14:39:01 +00:00
|
|
|
fi
|
|
|
|
echo
|