diff --git a/install.sh b/install.sh index 7c0d585..41021c4 100755 --- a/install.sh +++ b/install.sh @@ -446,6 +446,16 @@ getDotfiles() { chsh -s $(which zsh) } +checkForGraphicalInterface() { + journalctl --sync + result=$(journalctl -b -r -g "Graphical" | wc -l) + while [ $result -lt 2 ]; do + journalctl --sync + result=$(journalctl -b -r -g "Graphical" | wc -l) + sleep 1 + done +} + steps=( checkUefi updateSystemClock @@ -476,7 +486,6 @@ runScript() { done if [ -d "$HOME/Documents" ]; then - clear whiptail --title "CocoASAIS" --msgbox "Now, we will finish the installation. Press OK and wait." 7 60 getDotfiles whiptail --title "CocoASAIS" --msgbox "All done!" 0 0 @@ -502,10 +511,10 @@ runScript() { if [ $i -gt 0 ]; then welcomeMsg="Welcome back to CocoASAIS!" else + checkForGraphicalInterface welcomeMsg="Welcome to CocoASAIS!" fi - reset whiptail --title "CocoASAIS" --msgbox "${welcomeMsg}" 0 0 while [ $i -le "${#steps[@]}" ]; do