diff --git a/install.sh b/install.sh index 2d551e32..5829dc56 100644 --- a/install.sh +++ b/install.sh @@ -11,11 +11,13 @@ if $RUNNING_GNOME; then # Ensure computer doesn't go to sleep or lock while installing gsettings set org.gnome.desktop.screensaver lock-enabled false gsettings set org.gnome.desktop.session idle-delay 0 +fi - echo "Get ready to make a few choices..." - source ~/.local/share/omakub/install/terminal/required/app-gum.sh >/dev/null - source ~/.local/share/omakub/install/first-run-choices.sh +echo "Get ready to make a few choices..." +source ~/.local/share/omakub/install/terminal/required/app-gum.sh >/dev/null +source ~/.local/share/omakub/install/first-run-choices.sh +if $RUNNING_GNOME; then echo "Installing terminal and desktop tools.." else echo "Only installing terminal tools..." diff --git a/install/first-run-choices.sh b/install/first-run-choices.sh index dc6964c7..449229f0 100644 --- a/install/first-run-choices.sh +++ b/install/first-run-choices.sh @@ -1,6 +1,11 @@ -OPTIONAL_APPS=("1password" "Spotify" "Zoom" "Dropbox") -DEFAULT_OPTIONAL_APPS='1password,Spotify,Zoom' -export OMAKUB_FIRST_RUN_OPTIONAL_APPS=$(gum choose "${OPTIONAL_APPS[@]}" --no-limit --selected $DEFAULT_OPTIONAL_APPS --height 7 --header "Select optional apps" | tr ' ' '-') +# Desktop software and tweaks will only be installed if we're running Gnome +RUNNING_GNOME=$([[ "$XDG_CURRENT_DESKTOP" == *"GNOME"* ]] && echo true || echo false) + +if $RUNNING_GNOME; then + OPTIONAL_APPS=("1password" "Spotify" "Zoom" "Dropbox") + DEFAULT_OPTIONAL_APPS='1password,Spotify,Zoom' + export OMAKUB_FIRST_RUN_OPTIONAL_APPS=$(gum choose "${OPTIONAL_APPS[@]}" --no-limit --selected $DEFAULT_OPTIONAL_APPS --height 7 --header "Select optional apps" | tr ' ' '-') +fi AVAILABLE_LANGUAGES=("Ruby on Rails" "Node.js" "Go" "PHP" "Python" "Elixir" "Rust" "Java") SELECTED_LANGUAGES="Ruby on Rails","Node.js"