#!/bin/bash FIREFOX="org.mozilla.firefox" EDGE="com.microsoft.Edge" CHROME="com.google.Chrome" BRAVE="com.brave.Browser" LIBREOFFICE="org.libreoffice.LibreOffice" ONLYOFFICE="org.onlyoffice.desktopeditors" PINTA="com.github.PintaProject.Pinta" GIMP="org.gimp.GIMP" VLC="org.videolan.VLC" FLATSEAL="com.github.tchx84.Flatseal" FLATPAKS="$VLC $GIMP $PINTA $FLATSEAL" UBUNTU=$(dpkg -l | grep -E -o "\w+buntu(-mate|cinnamon|-budgie)?-desktop") if [[ $UBUNTU == *"buntu-desktop" ]]; then UBUNTU=$(echo $UBUNTU | cut -d"-" -f 1) else UBUNTU="ubuntu" fi APT_PKGS="flatpak $UBUNTU-restricted-extras" if [[ $UBUNTU == "kubuntu" ]] then APT_PKGS="$APT_PKGS plasma-discover-backend-flatpak kde-config-flatpak" else APT_PKGS="$APT_PKGS gnome-software-plugin-flatpak" fi office_suite=0 while [[ $office_suite -ne 1 && $office_suite -ne 2 ]]; do echo read -n 1 -p "Which office suite do you want to install? 1. OnlyOffice (Recommended) 2. LibreOffice Enter 1 or 2 > " office_suite echo done if [ $office_suite -eq 2 ] then FLATPAKS="$FLATPAKS $LIBREOFFICE" else FLATPAKS="$FLATPAKS $ONLYOFFICE" fi browser=0 while [[ $browser -lt 1 || $browser -gt 4 ]]; do echo read -n 1 -p " Which browser do you want to install? 1. Mozilla Firefox 2. Google Chrome 3. Microsoft Edge 4. Brave Enter 1, 2, 3 or 4 > " browser echo done if [ $browser -eq 2 ] then FLATPAKS="$FLATPAKS $CHROME" elif [ $browser -eq 3 ] then FLATPAKS="$FLATPAKS $EDGE" elif [ $browser -eq 4 ] then FLATPAKS="$FLATPAKS $BRAVE" else FLATPAKS="$FLATPAKS $FIREFOX" fi sudo apt-get update sudo apt-get -y purge "firefox*" "libreoffice*" "gimp*" "vlc*" sudo apt-get -y autoremove sudo apt-get -y full-upgrade echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | sudo debconf-set-selections sudo snap remove --purge --terminate firefox sudo apt-get -y install $APT_PKGS yes | sudo apt-mark minimize-manual sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo sudo flatpak -y install $FLATPAKS