mirror of
https://github.com/Lissy93/dotfiles.git
synced 2025-06-28 13:01:19 +02:00
Add script to install desktop apps on Linux GUI systsems, via Flatpak
This commit is contained in:
parent
96bccc0442
commit
22c6a04fdb
14
install.sh
14
install.sh
@ -168,7 +168,7 @@ function apply_preferences () {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Install / update vim plugins with Plug
|
# Install / update vim plugins with Plug
|
||||||
echo -e "${PURPLE}Installing Vim Plugins${RESET}"
|
echo -e "\n${PURPLE}Installing Vim Plugins${RESET}"
|
||||||
vim +PlugInstall +qall
|
vim +PlugInstall +qall
|
||||||
|
|
||||||
# Install / update Tmux plugins with TPM
|
# Install / update Tmux plugins with TPM
|
||||||
@ -207,8 +207,7 @@ function intall_macos_packages () {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# Update / Install the Homebrew packages in ~/.Brewfile
|
# Update / Install the Homebrew packages in ~/.Brewfile
|
||||||
if command_exists brew && [ -f "$DOTFILES_DIR/installs/Brewfile" ]
|
if command_exists brew && [ -f "$DOTFILES_DIR/installs/Brewfile" ]; then
|
||||||
then
|
|
||||||
echo -e "\n${PURPLE}Updating homebrew and packages...${RESET}"
|
echo -e "\n${PURPLE}Updating homebrew and packages...${RESET}"
|
||||||
brew update
|
brew update
|
||||||
brew upgrade
|
brew upgrade
|
||||||
@ -243,14 +242,21 @@ function intall_macos_packages () {
|
|||||||
# Based on system type, uses appropriate package manager to install / updates apps
|
# Based on system type, uses appropriate package manager to install / updates apps
|
||||||
function install_packages () {
|
function install_packages () {
|
||||||
read -t $PROMPT_TIMEOUT -p "$(echo -e $CYAN_B)Would you like to install / update system packages? (y/N) " -n 1 -r
|
read -t $PROMPT_TIMEOUT -p "$(echo -e $CYAN_B)Would you like to install / update system packages? (y/N) " -n 1 -r
|
||||||
|
echo
|
||||||
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
||||||
echo -e "\n${PURPLE}Skipping package installs${RESET}"
|
echo -e "${PURPLE}Skipping package installs${RESET}"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
# Mac OS
|
# Mac OS
|
||||||
if [ "$system_type" = "Darwin" ]; then
|
if [ "$system_type" = "Darwin" ]; then
|
||||||
intall_macos_packages
|
intall_macos_packages
|
||||||
fi
|
fi
|
||||||
|
# If running in Linux desktop mode, prompt to install desktop apps via Flatpak
|
||||||
|
flatpak_script="${DOTFILES_DIR}/installs/flatpak.sh"
|
||||||
|
if [[ $(uname -s) == "Linux" ]] && [ ! -z $XDG_CURRENT_DESKTOP ] && [ -f $flatpak_script ]; then
|
||||||
|
chmod +x $flatpak_script
|
||||||
|
$flatpak_script
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Updates current session, and outputs summary
|
# Updates current session, and outputs summary
|
||||||
|
@ -113,6 +113,15 @@ function install_flatpak () {
|
|||||||
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Ask user if they'd like to proceed, and exit if not
|
||||||
|
echo -e "${CYAN_B}Would you like to install Flatpak desktop apps? (y/N)${RESET}\n"
|
||||||
|
read -t $PROMPT_TIMEOUT -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
||||||
|
echo -e "${YELLOW}Skipping Flatpak installations..."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
echo -e "${CYAN_B}Starting Flatpak App Installation Script${RESET}"
|
echo -e "${CYAN_B}Starting Flatpak App Installation Script${RESET}"
|
||||||
|
|
||||||
# Check that Flatpak is present, prompt to install or exit if not
|
# Check that Flatpak is present, prompt to install or exit if not
|
||||||
|
Loading…
x
Reference in New Issue
Block a user