hyprland-dotfiles/.install/disabledm.sh

45 lines
1.8 KiB
Bash
Raw Normal View History

2023-11-10 21:12:15 +00:00
# ------------------------------------------------------
# Disable display manager
# ------------------------------------------------------
disman=0
if [ -f /etc/systemd/system/display-manager.service ]; then
2023-11-17 12:48:02 +00:00
echo -e "${GREEN}"
2023-11-10 21:12:15 +00:00
cat <<"EOF"
2023-11-21 20:19:51 +00:00
____ _ _ __ __
| _ \(_)___ _ __ | | __ _ _ _ | \/ | __ _ _ __ __ _ __ _ ___ _ __
| | | | / __| '_ \| |/ _` | | | | | |\/| |/ _` | '_ \ / _` |/ _` |/ _ \ '__|
| |_| | \__ \ |_) | | (_| | |_| | | | | | (_| | | | | (_| | (_| | __/ |
|____/|_|___/ .__/|_|\__,_|\__, | |_| |_|\__,_|_| |_|\__,_|\__, |\___|_|
|_| |___/ |___/
2023-11-10 21:12:15 +00:00
EOF
2023-11-17 12:48:02 +00:00
echo -e "${NONE}"
2023-11-10 21:12:15 +00:00
echo "An active display manager has been dedected."
echo ""
2023-11-22 11:24:40 +00:00
if [[ $profile == *"Hyprland"* ]]; then
2023-11-12 13:16:53 +00:00
echo "IMPORTANT: Starting Hyprland from tty (terminal) with command Hyprland is recommended."
2023-11-10 21:12:15 +00:00
echo "Login with display managers could fail and could have negative side effects on some devices."
fi
2023-11-22 11:24:40 +00:00
if [[ $profile == *"Qtile"* ]]; then
2023-11-10 21:12:15 +00:00
echo "PLEASE NOTE: Qtile works with Display Managers."
echo "But if you want to use the tty based (terminal) login instead, you can disable the display manager now."
fi
echo ""
2023-11-21 20:19:51 +00:00
if gum confirm "Do you want to deactive the current display manager?" ;then
if [ -f /etc/systemd/system/display-manager.service ]; then
sudo rm /etc/systemd/system/display-manager.service
echo "Current display manager removed."
fi
disman=1
elif [ $? -eq 130 ]; then
exit 130
else
echo "Disable display manager skipped."
echo "You can run ~/dotfiles/hypr/script/disablewm.sh at a later point of time if needed."
fi
2023-11-10 21:12:15 +00:00
echo ""
else
disman=1
fi