mirror of
https://github.com/aljazceru/omakub.git
synced 2025-12-17 12:34:21 +01:00
Allow terminal-only installation and use upfront choices
This commit is contained in:
40
install.sh
40
install.sh
@@ -1,23 +1,31 @@
|
|||||||
# Exit immediately if a command exits with a non-zero status
|
# Exit immediately if a command exits with a non-zero status
|
||||||
set -e
|
# set -e
|
||||||
|
|
||||||
# Needed for all installers
|
# Desktop software and tweaks will only be installed if we're running Gnome
|
||||||
sudo apt update -y
|
RUNNING_GNOME=$([[ "$XDG_CURRENT_DESKTOP" == *"GNOME"* ]] && echo true || echo false)
|
||||||
sudo apt install -y curl git unzip
|
|
||||||
|
|
||||||
# Ensure computer doesn't go to sleep or lock while installing
|
if $RUNNING_GNOME; then
|
||||||
gsettings set org.gnome.desktop.screensaver lock-enabled false
|
# Ensure computer doesn't go to sleep or lock while installing
|
||||||
gsettings set org.gnome.desktop.session idle-delay 0
|
gsettings set org.gnome.desktop.screensaver lock-enabled false
|
||||||
|
gsettings set org.gnome.desktop.session idle-delay 0
|
||||||
|
|
||||||
# Run installers
|
echo "Get ready to make a few choices..."
|
||||||
for script in ~/.local/share/omakub/install/*.sh; do source $script; done
|
source ~/.local/share/omakub/install/terminal/required/app-gum.sh >/dev/null
|
||||||
|
source ~/.local/share/omakub/first_run_choices.sh
|
||||||
|
|
||||||
# Upgrade everything that might ask for a reboot last
|
echo "Installing terminal and desktop tools.."
|
||||||
sudo apt upgrade -y
|
else
|
||||||
|
echo "Only installing terminal tools..."
|
||||||
|
fi
|
||||||
|
|
||||||
# Revert to normal idle and lock settings
|
# Install terminal tools
|
||||||
gsettings set org.gnome.desktop.screensaver lock-enabled true
|
source ~/.local/share/omakub/install/terminal.sh
|
||||||
gsettings set org.gnome.desktop.session idle-delay 300
|
|
||||||
|
|
||||||
# Logout to pickup changes
|
if $RUNNING_GNOME; then
|
||||||
gum confirm "Ready to logout for all settings to take effect?" && gnome-session-quit --logout --no-prompt
|
# Install desktop tools and tweaks
|
||||||
|
source ~/.local/share/omakub/install/desktop.sh
|
||||||
|
|
||||||
|
# Revert to normal idle and lock settings
|
||||||
|
gsettings set org.gnome.desktop.screensaver lock-enabled true
|
||||||
|
gsettings set org.gnome.desktop.session idle-delay 300
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user