Hyprland-dotfiles/.install/screenlock.sh

29 lines
1.0 KiB
Bash
Raw Normal View History

2024-02-23 09:39:01 -05: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 10:03:57 -05: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 09:39:01 -05:00
if gum confirm "Do you want to install hypridle and hyprlock?" ;then
2024-02-23 10:03:57 -05:00
# Install Hypridle and Hyprlock
2024-02-23 09:39:01 -05:00
yay --noconfirm -S hypridle-git hyprlock-git
2024-02-23 10:03:57 -05: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 09:39:01 -05:00
fi
else
echo ":: hypridle and hyprlock are already installed."
fi
echo