Skip to content

Commit

Permalink
fix(setup): fix conditions for .desktop files
Browse files Browse the repository at this point in the history
Closes issue #24
  • Loading branch information
pondichys committed Aug 13, 2024
1 parent cd1431f commit 2c4e1b9
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,18 @@ installFlatpak() {
# Desktop Environment menu
deMenu() {

clear

if ! (find /usr/share/xsessions -name "*.desktop" &> /dev/null) || ! (find /usr/share/wayland-sessions -name "*.desktop" &> /dev/null); then
echo "${RED}Desktop environment already installed"
echo "Quitting this menu${RESET}"
read -rsn 1 -p "Press any key to continue ..."
return 0
fi

PS3="Select a Desktop Environment: "
local items=("gnome" "kde plasma" "xfce")

while true; do
clear
if [[ -f /usr/share/xsessions/*.desktop || -f /usr/share/wayland-sessions/*.desktop ]]; then
echo "${RED}Desktop environment already installed"
echo "Quitting this menu${RESET}"
read -rsn 1 -p "Press any key to continue ..."
return 0
fi

printf "%s" "${YELLOW}"
figlet -ckf slant "Desktop environments"
printf "%s" "${RESET}"
Expand Down

0 comments on commit 2c4e1b9

Please sign in to comment.