Hyprland-dotfiles/.install/disabledm.sh

55 lines
2.2 KiB
Bash
Raw Normal View History

2023-11-10 16:12:15 -05:00
# ------------------------------------------------------
# Disable display manager
# ------------------------------------------------------
disman=0
if [ -f /etc/systemd/system/display-manager.service ]; then
cat <<"EOF"
___ _ _
|_ _|_ __ ___ _ __ ___ _ __| |_ __ _ _ __ | |_
| || '_ ` _ \| '_ \ / _ \| '__| __/ _` | '_ \| __|
| || | | | | | |_) | (_) | | | || (_| | | | | |_
|___|_| |_| |_| .__/ \___/|_| \__\__,_|_| |_|\__|
|_|
EOF
echo "An active display manager has been dedected."
echo ""
if [ $profile == "Hyprland" ]; then
2023-11-12 08:16:53 -05:00
echo "IMPORTANT: Starting Hyprland from tty (terminal) with command Hyprland is recommended."
2023-11-10 16:12:15 -05:00
echo "Login with display managers could fail and could have negative side effects on some devices."
fi
if [ $profile == "Qtile" ]; then
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
if [ $profile == "All" ]; then
2023-11-12 08:16:53 -05:00
echo "IMPORTANT: Starting Hyprland from tty (terminal) with command Hyprland is recommended."
2023-11-10 16:12:15 -05:00
echo "Login with display managers could fail and could have negative side effects on some devices."
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 ""
while true; do
read -p "Do you want to deactive the current display manager (Yy/Nn): " yn
case $yn in
[Yy]* )
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
break;;
[Nn]* )
echo "Disable display manager skipped."
echo "You can run ~/dotfiles/hypr/script/disablewm.sh at a later point of time if needed."
break;;
* ) echo "Please answer yes or no.";;
esac
done
echo ""
else
disman=1
fi