2020-11-11 08:58:21 -05:00
|
|
|
#!/bin/bash
|
2020-10-03 11:50:23 -04:00
|
|
|
function goto
|
|
|
|
{
|
|
|
|
label=$1
|
|
|
|
cmd=$(sed -n "/^:[[:blank:]][[:blank:]]*${label}/{:a;n;p;ba};" $0 |
|
|
|
|
grep -v ':$')
|
|
|
|
eval "$cmd"
|
|
|
|
exit
|
|
|
|
}
|
|
|
|
|
2020-11-11 08:58:21 -05:00
|
|
|
function upgrade2ultimate
|
|
|
|
{
|
|
|
|
rm -rf /tmp/setup-assistant
|
|
|
|
mkdir -p /tmp/setup-assistant
|
2020-10-27 08:02:51 -04:00
|
|
|
|
2020-11-11 08:58:21 -05:00
|
|
|
clear
|
|
|
|
echo "We are going to ask you several questions so you can decide if you want a piece of software or not."
|
2020-11-11 17:57:55 -05:00
|
|
|
echo "Do you need asian font support? (y,n)"
|
2020-11-11 08:58:21 -05:00
|
|
|
echo ""
|
|
|
|
read asian
|
|
|
|
if [ $asian = "y" ]; then
|
2020-11-11 09:59:30 -05:00
|
|
|
echo "garuda-asian" >> /tmp/setup-assistant/pkgs.txt
|
2020-11-11 08:58:21 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
clear
|
|
|
|
echo "What about Snaps, Flatpak & Appimage support? (y,n)"
|
2020-11-11 10:18:59 -05:00
|
|
|
echo "This enables you to use software not available in our repos."
|
|
|
|
echo "If an application is available we advise to use the native version!"
|
2020-11-11 08:58:21 -05:00
|
|
|
read snap
|
|
|
|
if [ $snap = "y" ]; then
|
2020-11-11 09:59:30 -05:00
|
|
|
echo "sudo pacman -R pamac-aur pamac-tray-appindicator" >> /tmp/setup-assistant/prepare.sh
|
|
|
|
echo "pamac-all
|
|
|
|
appimagelauncher
|
|
|
|
fwupd
|
|
|
|
apparmor
|
|
|
|
snapd
|
|
|
|
snapd-glib
|
|
|
|
flatpak" >> /tmp/setup-assistant/pkgs.txt
|
2020-11-11 10:18:59 -05:00
|
|
|
echo "sudo systemctl enable --now snapd.socket" >> /tmp/setup-assistant/setup.sh
|
|
|
|
echo "sudo systemctl enable --now apparmor.service" >> /tmp/setup-assistant/setup.sh
|
|
|
|
echo "sudo systemctl enable --now snapd.apparmor.service" >> /tmp/setup-assistant/setup.sh
|
|
|
|
|
2020-11-11 08:58:21 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
clear
|
2020-11-11 10:18:59 -05:00
|
|
|
echo "Do you need gaming applications installed? 🎮 (y,n)"
|
2020-11-11 08:58:21 -05:00
|
|
|
echo "This will install the Garuda Gamer app in which every component needed to game can be enabled."
|
|
|
|
echo ""
|
|
|
|
read gaming
|
|
|
|
if [ $gaming = "y" ]; then
|
2020-11-11 09:59:30 -05:00
|
|
|
echo "garuda-gamer" >> /tmp/setup-assistant/pkgs.txt
|
|
|
|
echo "systemctl --user enable --now gamemoded >/dev/null 2>&1 &" >> /tmp/setup-assistant/setup.sh
|
2020-11-11 10:18:59 -05:00
|
|
|
echo "sudo setup_dxvk install 2>&1 &" >> /tmp/setup-assistant/setup.sh
|
2020-11-11 08:58:21 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
clear
|
|
|
|
echo "What about complete audio support? (y,n)"
|
|
|
|
echo "Saying yes will install PulseAudio, Alsa & Pipewire packages with its companion apps."
|
|
|
|
echo ""
|
|
|
|
read audio
|
|
|
|
if [ $audio = "y" ]; then
|
2020-11-11 09:59:30 -05:00
|
|
|
echo "garuda-alsa
|
|
|
|
garuda-pulse
|
|
|
|
garuda-pipewire
|
|
|
|
pulseaudio-ctl
|
|
|
|
playerctl" >> /tmp/setup-assistant/pkgs.txt
|
2020-11-11 10:18:59 -05:00
|
|
|
echo "sudo systemctl enable --now bluetooth-autoconnect" >> /tmp/setup-assistant/setup.sh
|
2020-11-11 10:21:12 -05:00
|
|
|
echo "systemctl enable pulseaudio-bluetooth-autoconnect --user" >> /tmp/setup-assistant/setup.sh
|
2020-11-11 08:58:21 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
clear
|
2020-11-11 10:18:59 -05:00
|
|
|
echo "Are you printing and scanning with this machine? 🖨"
|
2020-11-11 08:58:21 -05:00
|
|
|
echo "Also, do you need Samba support? (y,n)"
|
|
|
|
echo ""
|
|
|
|
read gaming
|
|
|
|
if [ $gaming = "y" ]; then
|
2020-11-11 09:59:30 -05:00
|
|
|
echo "garuda-settings-samba
|
|
|
|
system-config-samba
|
|
|
|
garuda-printer
|
|
|
|
garuda-scanner" >> /tmp/setup-assistant/pkgs.txt
|
2020-11-11 08:58:21 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
: office-selection
|
2020-11-11 15:21:27 -05:00
|
|
|
clear
|
2020-11-11 08:58:21 -05:00
|
|
|
echo "Now you are free to choose your favorite office suite."
|
2020-11-11 10:18:59 -05:00
|
|
|
echo "There are quite a lot of them to choose from. A guideline for new users:"
|
2020-11-11 09:59:30 -05:00
|
|
|
echo "LibreOffice is the most used and complete office application in the Linux world."
|
2020-11-11 08:58:21 -05:00
|
|
|
echo "If a simpler word processor is fine for you Abiword might also be a good choice."
|
|
|
|
echo ""
|
|
|
|
echo "1) LibreOffice"
|
|
|
|
echo "2) Onlyoffice"
|
|
|
|
echo "3) WPS Office"
|
|
|
|
echo "4) Free Office"
|
|
|
|
echo "5) Yozo Office"
|
|
|
|
echo "6) Calligra Office"
|
|
|
|
echo "7) Abiword"
|
2020-11-11 15:21:27 -05:00
|
|
|
echo ""
|
|
|
|
echo "Who needs office anyway? (n)"
|
2020-11-11 08:58:21 -05:00
|
|
|
read office
|
|
|
|
if [ $office = "1" ]; then
|
2020-11-11 09:59:30 -05:00
|
|
|
echo "libreoffice-fresh
|
|
|
|
libmythes" >> /tmp/setup-assistant/pkgs.txt
|
2020-11-11 08:58:21 -05:00
|
|
|
elif [ $office = "2" ]; then
|
2020-11-11 09:59:30 -05:00
|
|
|
echo "onlyoffice-bin" >> /tmp/setup-assistant/pkgs.txt
|
2020-11-11 08:58:21 -05:00
|
|
|
elif [ $office = "3" ]; then
|
2020-11-11 09:59:30 -05:00
|
|
|
echo "wps-office
|
|
|
|
wps-office-mime
|
|
|
|
ttf-wps-fonts" >> /tmp/setup-assistant/pkgs.txt
|
2020-11-11 08:58:21 -05:00
|
|
|
elif [ $office = "4" ]; then
|
2020-11-11 09:59:30 -05:00
|
|
|
echo "freeoffice" >> /tmp/setup-assistant/pkgs.txt
|
2020-11-11 08:58:21 -05:00
|
|
|
elif [ $office = "5" ]; then
|
2020-11-11 09:59:30 -05:00
|
|
|
echo "yozo-office
|
|
|
|
yozo-office-fonts" >> /tmp/setup-assistant/pkgs.txt
|
2020-11-11 08:58:21 -05:00
|
|
|
elif [ $office = "6" ]; then
|
2020-11-11 09:59:30 -05:00
|
|
|
echo "calligra" >> /tmp/setup-assistant/pkgs.txt
|
2020-11-11 08:58:21 -05:00
|
|
|
elif [ $office = "7" ]; then
|
2020-11-11 09:59:30 -05:00
|
|
|
echo "abiword" >> /tmp/setup-assistant/pkgs.txt
|
2020-11-11 15:21:27 -05:00
|
|
|
elif [ $office = "n" ]; then
|
2020-11-11 10:34:11 -05:00
|
|
|
echo "nooffice" >/dev/null 2>&1 &
|
2020-11-11 08:58:21 -05:00
|
|
|
else echo "Thats not a valid choice! ❌"
|
|
|
|
goto "office-selection"
|
|
|
|
fi
|
2020-10-27 08:02:51 -04:00
|
|
|
|
2020-11-11 08:58:21 -05:00
|
|
|
clear
|
2020-11-11 10:18:59 -05:00
|
|
|
echo "This question is about general desktop applications. ☁️"
|
2020-11-11 08:58:21 -05:00
|
|
|
echo "It contains apps such as Telegram, Nextcloud-client & Syncthing."
|
|
|
|
echo "Are these going to be installed? (y,n)"
|
2020-11-11 09:59:30 -05:00
|
|
|
read general
|
|
|
|
if [ $general = "y" ]; then
|
|
|
|
echo "telegram-desktop
|
|
|
|
joplin
|
|
|
|
murmur
|
|
|
|
mumble
|
|
|
|
discord
|
|
|
|
streamlink-twitch-gui
|
|
|
|
syncthing-gtk
|
|
|
|
nextcloud-client
|
|
|
|
firefox-extension-bitwarden
|
|
|
|
fractal
|
|
|
|
firefox-extension-xdm-browser-monitor" >> /tmp/setup-assistant/pkgs.txt
|
2020-11-11 08:58:21 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
: virt-selection
|
|
|
|
clear
|
2020-11-11 10:18:59 -05:00
|
|
|
echo "Are you rather a fan of virtualbox or virt-manager? 💻"
|
2020-11-11 08:58:21 -05:00
|
|
|
echo ""
|
|
|
|
echo "1) Virtualbox all the way!"
|
|
|
|
echo "2) Id rather choose Virt-manager."
|
2020-11-11 15:21:27 -05:00
|
|
|
echo ""
|
|
|
|
echo "I dont need virtualisation software! (n)"
|
2020-11-11 08:58:21 -05:00
|
|
|
read virt
|
|
|
|
if [ $virt = "1" ]; then
|
2020-11-11 09:59:30 -05:00
|
|
|
echo "garuda-virtualbox" >> /tmp/setup-assistant/pkgs.txt
|
2020-11-11 10:18:59 -05:00
|
|
|
echo "sudo usermod -aG vboxusers $USER" >> /tmp/setup-assistant/setup.sh
|
2020-11-11 08:58:21 -05:00
|
|
|
elif [ $virt = "2" ]; then
|
2020-11-11 09:59:30 -05:00
|
|
|
echo "garuda-virt-manager" >> /tmp/setup-assistant/pkgs.txt
|
|
|
|
echo "sudo systemctl enable --now libvirtd" >> /tmp/setup-assistant/setup.sh
|
2020-11-11 10:18:59 -05:00
|
|
|
echo "sudo usermod -aG libvirt $USER" >> /tmp/setup-assistant/setup.sh
|
|
|
|
echo "sudo usermod -aG kvm $USER" >> /tmp/setup-assistant/setup.sh
|
2020-11-11 15:21:27 -05:00
|
|
|
elif [ $virt = "n" ]; then
|
|
|
|
echo "novirt" >/dev/null 2>&1 &
|
2020-11-11 08:58:21 -05:00
|
|
|
else echo "Thats not a valid choice! ❌"
|
|
|
|
goto "virt-selection"
|
|
|
|
fi
|
|
|
|
|
|
|
|
clear
|
2020-11-11 10:18:59 -05:00
|
|
|
sh /tmp/setup-assistant/prepare.sh
|
2020-11-11 09:59:30 -05:00
|
|
|
cat /tmp/setup-assistant/pkgs.txt | sed '/^$/d;s/[[:blank:]]//g' > /tmp/setup-assistant/pkgs-install.txt
|
|
|
|
sudo pacman --needed -S - < /tmp/setup-assistant/pkgs-install.txt
|
2020-11-11 10:18:59 -05:00
|
|
|
sh /tmp/setup-assistant/setup.sh
|
2020-11-11 09:59:30 -05:00
|
|
|
|
|
|
|
rm -rf /tmp/setup-assistant
|
2020-11-11 08:58:21 -05:00
|
|
|
}
|
2020-10-27 08:02:51 -04:00
|
|
|
|
|
|
|
systemctl --user enable psd >/dev/null 2>&1 &
|
|
|
|
systemctl --user start psd >/dev/null 2>&1 &
|
|
|
|
|
|
|
|
libinput-gestures-setup autostart >/dev/null 2>&1 &
|
|
|
|
libinput-gestures-setup start >/dev/null 2>&1 &
|
|
|
|
|
2020-10-03 11:50:23 -04:00
|
|
|
: start
|
2020-11-11 08:58:21 -05:00
|
|
|
clear
|
2020-10-03 11:50:23 -04:00
|
|
|
echo "What do you want to do?"
|
|
|
|
echo ""
|
|
|
|
echo "1) Get initial mirrorlist & download list of packages"
|
2020-11-11 08:58:21 -05:00
|
|
|
echo "2) Update the system"
|
2020-11-10 13:53:33 -05:00
|
|
|
echo "3) Enable systemwide adblocking / HiDPI mode"
|
|
|
|
echo "4) Disable CPU migitations / change boot options"
|
2020-11-11 08:58:21 -05:00
|
|
|
echo "5) Install additional (Ultimate) packages by choosing which ones you need"
|
2020-10-03 11:50:23 -04:00
|
|
|
echo ""
|
2020-11-11 08:58:21 -05:00
|
|
|
echo "6) Exit"
|
2020-10-03 11:50:23 -04:00
|
|
|
|
|
|
|
read selection
|
|
|
|
|
|
|
|
if [ $selection = "1" ]; then
|
2020-11-10 13:53:33 -05:00
|
|
|
clear
|
2020-11-10 14:04:01 -05:00
|
|
|
echo "Select the right mirrors in Reflector Simple!"
|
|
|
|
echo "If no mirrors were found select german servers. ☝🏻"
|
2020-10-03 11:50:23 -04:00
|
|
|
reflector-simple >/dev/null 2>&1
|
|
|
|
sudo pacman -Syy
|
|
|
|
goto "start"
|
|
|
|
elif [ $selection = "2" ]; then
|
2020-11-10 13:53:33 -05:00
|
|
|
clear
|
2020-10-03 11:50:23 -04:00
|
|
|
sudo pacman -Syu
|
|
|
|
goto "start"
|
2020-11-10 13:53:33 -05:00
|
|
|
elif [ $selection = "3" ]; then
|
|
|
|
clear
|
2020-10-06 09:42:47 -04:00
|
|
|
echo "Find it in the settings tab. 🖥"
|
2020-10-03 11:50:23 -04:00
|
|
|
garuda-welcome >/dev/null 2>&1
|
|
|
|
goto "start"
|
2020-11-10 13:53:33 -05:00
|
|
|
elif [ $selection = "4" ]; then
|
|
|
|
clear
|
2020-11-10 14:04:01 -05:00
|
|
|
echo "Disabling CPU mitiations increases performance but can possibly lead to security issues."
|
2020-10-06 09:42:47 -04:00
|
|
|
echo "Use it with caution! 🛑"
|
|
|
|
sudo garuda-boot-options >/dev/null 2>&1
|
2020-10-03 11:50:23 -04:00
|
|
|
goto "start"
|
2020-11-10 13:53:33 -05:00
|
|
|
elif [ $selection = "5" ]; then
|
2020-11-11 08:58:21 -05:00
|
|
|
upgrade2ultimate
|
|
|
|
elif [ $selection = "6" ]; then
|
2020-10-03 11:50:23 -04:00
|
|
|
exit
|
2020-11-11 10:18:59 -05:00
|
|
|
else "Thats not a valid choice! ❌"
|
2020-10-03 11:50:23 -04:00
|
|
|
goto "start"
|
|
|
|
fi
|