Files
snigdhaos-system-installation/usr/local/bin/snigdhaos-fixes
2024-08-01 04:13:56 +05:30

38 lines
900 B
Bash
Executable File

#!/bin/bash
# set -e
# Author : Eshan Roy <eshan@snigdhaos.or>
# Author URL : https://eshanized.github.io/
echo
echo "--->> Start snigdhaos-fixes <<---"
echo
# Get the current desktop environment
desktop=$(ls /usr/share/xsessions/)
# Define a function to install and enable SDDM
install_sddm() {
echo "INSTALLED: LightDM/GDM [STATUS: ACTIVE]"
pacman -S sddm --noconfirm --needed
systemctl enable sddm.service -f
}
# Check for specific desktop environments and install SDDM if necessary
case $desktop in
ukui.desktop|deepin.desktop)
echo "Found : Lightm [STATUS: ACTIVE]"
install_sddm
;;
*)
# Check for other desktop environments
if [ -f /usr/bin/gnome-session ] || [ -f /usr/bin/startdde ] || [ -f /usr/bin/ukui-session ]; then
install_sddm
else
echo "Nothing To Do!!!"
fi
esac
echo
echo "--->> End snigdhaos-fixes <<---"
echo