mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2025-02-23 17:37:03 +00:00
dm fixes and posix
This commit is contained in:
parent
6b572b1ab4
commit
c12ae4a8ef
|
@ -35,8 +35,8 @@ install_nerd_font() {
|
||||||
FONT_URL="https://github.com/ryanoasis/nerd-fonts/releases/latest/download/Meslo.zip"
|
FONT_URL="https://github.com/ryanoasis/nerd-fonts/releases/latest/download/Meslo.zip"
|
||||||
FONT_INSTALLED=$(fc-list | grep -i "Meslo")
|
FONT_INSTALLED=$(fc-list | grep -i "Meslo")
|
||||||
|
|
||||||
# Check if Meslo Nerd-font is already installed
|
# Replace -n test with standard test
|
||||||
if [ -n "$FONT_INSTALLED" ]; then
|
if [ ! -z "$FONT_INSTALLED" ]; then
|
||||||
printf "%b\n" "${GREEN}Meslo Nerd-fonts are already installed.${RC}"
|
printf "%b\n" "${GREEN}Meslo Nerd-fonts are already installed.${RC}"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
@ -207,29 +207,37 @@ setupDisplayManager() {
|
||||||
done
|
done
|
||||||
printf "%b\n" "${GREEN}Current display manager: $currentdm${RC}"
|
printf "%b\n" "${GREEN}Current display manager: $currentdm${RC}"
|
||||||
if [ "$currentdm" = "none" ]; then
|
if [ "$currentdm" = "none" ]; then
|
||||||
printf "%b\n" "${YELLOW}--------------------------${RC}"
|
while : ; do
|
||||||
printf "%b\n" "${YELLOW}Pick your Display Manager ${RC}"
|
printf "%b\n" "${YELLOW}--------------------------${RC}"
|
||||||
printf "%b\n" "${YELLOW}1. SDDM ${RC}"
|
printf "%b\n" "${YELLOW}Pick your Display Manager ${RC}"
|
||||||
printf "%b\n" "${YELLOW}2. LightDM ${RC}"
|
printf "%b\n" "${YELLOW}1. SDDM ${RC}"
|
||||||
printf "%b\n" "${YELLOW}3. GDM ${RC}"
|
printf "%b\n" "${YELLOW}2. LightDM ${RC}"
|
||||||
printf "%b\n" "${YELLOW} ${RC}"
|
printf "%b\n" "${YELLOW}3. GDM ${RC}"
|
||||||
printf "%b" "${YELLOW}Please select one: ${RC}"
|
printf "%b\n" "${YELLOW}4. None ${RC}"
|
||||||
read -r choice
|
printf "%b" "${YELLOW}Please select one: ${RC}"
|
||||||
case "$choice" in
|
read -r choice
|
||||||
1)
|
case "$choice" in
|
||||||
DM="sddm"
|
1)
|
||||||
;;
|
DM="sddm"
|
||||||
2)
|
break
|
||||||
DM="lightdm"
|
;;
|
||||||
;;
|
2)
|
||||||
3)
|
DM="lightdm"
|
||||||
DM="gdm"
|
break
|
||||||
;;
|
;;
|
||||||
*)
|
3)
|
||||||
printf "%b\n" "${RED}Invalid selection! Please choose 1, 2, or 3.${RC}"
|
DM="gdm"
|
||||||
exit 1
|
break
|
||||||
;;
|
;;
|
||||||
esac
|
4)
|
||||||
|
printf "%b\n" "${GREEN}No display manager will be installed${RC}"
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
printf "%b\n" "${RED}Invalid selection! Please choose 1, 2, 3, or 4.${RC}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
case "$PACKAGER" in
|
case "$PACKAGER" in
|
||||||
pacman)
|
pacman)
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm "$DM"
|
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm "$DM"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user