1
0
Fork 0
mirror of synced 2024-06-21 15:31:09 -04:00
garuda-common-settings/usr/bin/setup-assistant
2020-11-10 22:39:36 +01:00

163 lines
5.2 KiB
Bash
Executable file

#!/bin/bash
function goto
{
label=$1
cmd=$(sed -n "/^:[[:blank:]][[:blank:]]*${label}/{:a;n;p;ba};" $0 |
grep -v ':$')
eval "$cmd"
exit
}
systemctl --user enable gamemoded >/dev/null 2>&1 &
systemctl --user start gamemoded >/dev/null 2>&1 &
systemctl --user enable pulseaudio-bluetooth-autoconnect >/dev/null 2>&1 &
systemctl --user start pulseaudio-bluetooth-autoconnect >/dev/null 2>&1 &
systemctl --user enable android-session-manager >/dev/null 2>&1 &
systemctl --user start android-session-manager >/dev/null 2>&1 &
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 &
clear
echo "Welcome to the initial setup assistant!"
: start
clear
echo "What do you want to do?"
echo ""
echo "1) Get initial mirrorlist & download list of packages"
echo "2) Update the system"
echo "3) Enable systemwide adblocking / HiDPI mode"
echo "4) Disable CPU migitations / change boot options"
echo ""
echo "Install additional (Ultimate) packages:"
echo "5) Asian fonts packages"
echo "6) Snap, Appimage & Flatpak support"
echo "7) Gaming dependencies, Lutris & Steam"
echo "8) PulseAudio, Alsa & Pipewire support"
echo "9) Scanner, Printer & Samba support"
echo "10) Office packages (Libreoffice, Onlyoffice, ...)"
echo "11) Recommended desktop utilities (Telegram, Nextcloud, XDM, ...)"
echo "12) Virtualisation software"
echo ""
echo "13) Exit"
read selection
if [ $selection = "1" ]; then
clear
echo "Select the right mirrors in Reflector Simple!"
echo "If no mirrors were found select german servers. ☝🏻"
reflector-simple >/dev/null 2>&1
sudo pacman -Syy
goto "start"
elif [ $selection = "2" ]; then
clear
sudo pacman -Syu
goto "start"
elif [ $selection = "3" ]; then
clear
echo "Find it in the settings tab. 🖥"
garuda-welcome >/dev/null 2>&1
goto "start"
elif [ $selection = "4" ]; then
clear
echo "Disabling CPU mitiations increases performance but can possibly lead to security issues."
echo "Use it with caution! 🛑"
sudo garuda-boot-options >/dev/null 2>&1
goto "start"
elif [ $selection = "5" ]; then
clear
sudo pacman -Syu --noconfirm garuda-asian noto-fonts-extra
goto "start"
elif [ $selection = "6" ]; then
clear
sudo pacman -R pamac-aur pamac-tray-appindicator
sudo pacman -Syu --noconfirm pamac-all appimagelauncher fwupd apparmor snapd snapd-glib flatpak
sudo systemctl enable --now snapd
goto "start"
elif [ $selection = "7" ]; then
: gaming
if pacman -Qs garuda-gamer > /dev/null ; then
echo "Now you can choose which components you need using the Garuda Gamer app. 🎮"
garuda-gamer >/dev/null 2>&1
goto "start"
else sudo pacman -Syu garuda-gamer
goto "gaming"
fi
elif [ $selection = "8" ]; then
clear
sudo pacman -Syu --noconfirm --needed garuda-alsa garuda-pulse garuda-pipewire pulseaudio-ctl playerctl
goto "start"
elif [ $selection = "9" ]; then
clear
sudo pacman -Syu --noconfirm --needed garuda-settings-samba system-config-samba garuda-printer garuda-scanner
goto "start"
elif [ $selection = "10" ]; then
: office-selection
clear
echo "Which of these do you need?"
echo "LibreOffice is the recommended choice if you dont know any of these and need a full office suite. 🖨"
echo "If you prefer a simple word processor Abiword is also a good choice to begin with."
echo ""
echo "1) LibreOffice "
echo "2) Onlyoffice"
echo "3) WPS Office"
echo "4) Free Office"
echo "5) Yozo Office"
echo "6) Abiword"
read office
if [ $office = "1" ]; then
sudo pacman -Syu libreoffice-fresh libmythes
goto "start"
elif [ $office = "2" ]; then
sudo pacman -Syu onlyoffice-bin
goto "start"
elif [ $office = "3" ]; then
sudo pacman -Syu wps-office wps-office-mime ttf-wps-fonts
goto "start"
elif [ $office = "4" ]; then
sudo pacman -Syu freeoffice
goto "start"
elif [ $office = "5" ]; then
sudo pacman -Syu yozo-office yozo-office-fonts
goto "start"
elif [ $office = "6" ]; then
sudo pacman -Syu abiword
goto "start"
else echo "Thats not a valid choice! ❌"
goto "office-selection"
fi
elif [ $selection = "11" ]; then
clear
sudo pacman -Syu --noconfirm --needed telegram-desktop joplin murmur mumble discord streamlink-twitch-gui syncthing-gtk nextcloud-client firefox-extension-bitwarden fractal firefox-extension-xdm-browser-monitor
goto "start"
elif [ $selection = "12" ]; then
: virt-selection
clear
echo "Are you rather a fan of virtualbox or virt-manager?"
echo ""
echo "1) Virtualbox all the way!"
echo "2) Id rather choose Virt-manager."
read virt
if [ $virt = "1" ]; then
sudo pacman -Syu garuda-virtualbox
goto "start"
elif [ $virt = "2" ]; then
sudo pacman -Syu garuda-virt-manager
goto "start"
else echo "Thats not a valid choice! ❌"
goto "virt-selection"
fi
elif [ $selection = "13" ]; then
exit
else echo "Thats not a valid choice! ❌"
goto "start"
fi