1
0
Fork 0
mirror of synced 2024-11-05 09:49:00 -05:00
garuda-common-settings/etc/skel/.config/autostart-scripts/setup-assistant.sh
2020-10-06 20:02:16 +05:30

105 lines
3.1 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
}
clear
echo "Welcome to the initial setup assistant!"
: start
echo "What do you want to do?"
echo ""
echo "Lite & Ultimate:"
echo "1) Get initial mirrorlist & download list of packages"
echo "2) Update the system"
echo "3) Debloat the system"
echo "4) Enable systemwide adblocking / HiDPI mode / guest user"
echo " also disable Samba / printing / scanner support"
echo "5) Disable CPU migitations / enable sysrq / set boot options"
echo ""
echo "Lite only:"
echo "6) Fix missing characters by installing full noto-fonts packages"
echo "7) Enable Snap & Flatpak support"
echo "8) Install gaming dependencies, Lutris & Steam"
echo "9) Upgrade to Ultimate (excluding desktop-specific apps)"
echo ""
echo "10) Exit & delete this assistant"
echo ""
read selection
if [ $selection = "1" ]; then
echo ""
echo "Select options in Reflector Simple!"
echo "If no mirrors were found select german servers."
reflector-simple >/dev/null 2>&1
sudo pacman -Syy
echo ""
goto "start"
elif [ $selection = "2" ]; then
echo ""
sudo pacman -Syu
echo ""
echo "System upgraded."
echo ""
goto "start"
elif [ $selection = "3" ]; then
echo ""
echo "Follow the short tutorial."
echo "Make sure to inspect the removed packages first! 🛑"
firefox --new-window https://wiki.garudalinux.org/en/removing-bloat >/dev/null 2>&1 &
pamac-manager >/dev/null 2>&1
goto "start"
elif [ $selection = "4" ]; then
echo ""
echo "Find it in the settings tab. 🖥"
garuda-welcome >/dev/null 2>&1
echo ""
goto "start"
elif [ $selection = "5" ]; then
echo ""
echo "Disabling CPU mitiations increases performance but can possibly lead to"
echo "security issues."
echo "Use it with caution! 🛑"
sudo garuda-boot-options >/dev/null 2>&1
echo ""
goto "start"
elif [ $selection = "6" ]; then
echo ""
sudo pacman -Syu --noconfirm noto-fonts-extra noto-fonts-cjk
echo ""
echo "Extra fonts should be installed now."
goto "start"
elif [ $selection = "7" ]; then
echo ""
sudo pacman -Syu --noconfirm snapd snapd-glib apparmor flatpak pamac-all appimagelauncher
sudo systemctl enable --now snapd
sudo systemctl enable --now apparmor
sudo systemctl enable --now snapd.apparmor
echo ""
echo "Snap & Flatpak support should now be enabled."
goto "start"
elif [ $selection = "8" ]; then
echo ""
sudo pacman -Syu --noconfirm gamemode lib32-gamemode lutris garuda-wine steam steam-native-runtime mangohud proton-tkg-git dxvk-mingw-git
systemctl --user enable --now gamemoded
echo ""
echo "All gaming should now be installed. 🕹"
goto "start"
elif [ $selection = "9" ]; then
echo ""
sudo sh ~/.config/autostart-scripts/upgrade-to-ultimate.sh
echo ""
goto "start"
elif [ $selection = "10" ]; then
rm -r ~/.config/autostart-scripts/setup-assistant.sh
echo "Script deleted."
exit
else echo "Thats not a valid choice! ❌"
goto "start"
fi