add standard-desktop-setup.sh
This commit is contained in:
89
standard-desktop-setup.sh
Normal file
89
standard-desktop-setup.sh
Normal file
@@ -0,0 +1,89 @@
|
||||
#!/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 "\\n
|
||||
Which browser do you want to install?\\n
|
||||
\\n
|
||||
1. Mozilla Firefox\\n
|
||||
2. Google Chrome\\n
|
||||
3. Microsoft Edge\\n
|
||||
4. Brave\\n
|
||||
\\n
|
||||
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 purge -y "firefox*" "libreoffice*" "gimp*" "vlc*"
|
||||
sudo apt-get 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 install -y $APT_PKGS
|
||||
yes | sudo apt-mark minimize-manual
|
||||
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
sudo flatpak install -y $FLATPAKS
|
||||
Reference in New Issue
Block a user