1
0
Fork 0
mirror of synced 2024-11-22 18:15:37 -05:00
garuda-common-settings/usr/bin/setup-assistant

184 lines
6.2 KiB
Text
Raw Normal View History

#!/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-10-27 08:02:51 -04:00
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 &
2020-10-03 11:50:23 -04:00
clear
echo "Welcome to the initial setup assistant!"
2020-10-06 09:42:47 -04:00
2020-10-03 11:50:23 -04:00
: start
2020-11-10 13:53:33 -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"
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-10-03 11:50:23 -04:00
echo ""
2020-11-10 13:53:33 -05:00
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"
2020-10-03 11:50:23 -04:00
echo ""
2020-11-10 13:53:33 -05:00
echo "13) 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
clear
sudo pacman -Syu --noconfirm garuda-asian noto-fonts-extra
2020-10-03 11:50:23 -04:00
goto "start"
2020-11-10 13:53:33 -05:00
elif [ $selection = "6" ]; then
clear
2020-10-14 10:05:27 -04:00
sudo pacman -R pamac-aur pamac-tray-appindicator
2020-10-29 12:08:59 -04:00
sudo pacman -Syu --noconfirm pamac-all appimagelauncher fwupd apparmor snapd snapd-glib flatpak
2020-11-10 13:53:33 -05:00
sudo systemctl enable --now snapd
goto "start"
elif [ $selection = "7" ]; then
: game-selection
clear
echo "Which of these do you need?"
2020-11-10 14:04:01 -05:00
echo ""
echo "1) WINE! (running Windoze apps) 🍷"
echo "2) Game launchers (Lutris, Steam, etc..) ♟"
echo "3) Utilities (Fancontrol, Mangohud, Gamemode, ..) 🔧"
echo "4) Controller support 🎮"
echo "5) I dont care, just install everything! 🤪"
echo ""
echo "6) Go back"
2020-11-10 13:53:33 -05:00
read game
2020-11-10 14:04:01 -05:00
if [ $game = "1" ]; then
2020-11-10 13:53:33 -05:00
sudo pacman -S garuda-wine
goto "game-selection"
2020-11-10 14:04:01 -05:00
elif [ $game = "2" ]; then
2020-11-10 13:53:33 -05:00
sudo pacman -S ialauncher-git steam steam-native-runtime lutris gamehub itch minigalaxy legendary
goto "game-selection"
2020-11-10 14:04:01 -05:00
elif [ $game = "3" ]; then
2020-11-10 13:53:33 -05:00
sudo pacman -S openrgb-git piper fancontrol-gui-git corectrl gwe goverlay-git mangohud lib32-mangohud gamemode lib32-gamemode dxvk-mingw-git vkbasalt proton-tkg-git libretro vulkan-tools mesa-demos lib32-mesa-demos libdvdcss libva-utils vdpauinfo
systemctl --user enable --now gamemoded 2>&1 &
setup_dxvk install 2>&1 &
goto "game-selection"
2020-11-10 14:04:01 -05:00
elif [ $game = "4" ]; then
2020-11-10 13:53:33 -05:00
sudo pacman -S antimicrox linuxconsole xboxdrv xpadneo-dkms-git steamos-xpad-dkms xow-git xbox-generic-controller game-devices-udev retroarch-autoconfig-udev-git
goto "game-selection"
2020-11-10 14:04:01 -05:00
elif [ $game = "5" ]; then
sudo pacman -S garuda-gamer
elif [ $game = "6" ]; then
2020-11-10 13:53:33 -05:00
goto "start"
else echo "Thats not a valid choice! ❌"
goto "game-selection"
fi
2020-10-03 11:50:23 -04:00
goto "start"
elif [ $selection = "8" ]; then
2020-11-10 13:53:33 -05:00
clear
sudo pacman -S --noconfirm --needed garuda-alsa garuda-pulse garuda-pipewire pulseaudio-ctl playerctl
2020-10-03 11:50:23 -04:00
goto "start"
elif [ $selection = "9" ]; then
2020-11-10 13:53:33 -05:00
clear
sudo pacman -S --noconfirm --needed garuda-settings-samba system-config-samba garuda-printer garuda-scanner
2020-10-03 11:50:23 -04:00
goto "start"
elif [ $selection = "10" ]; then
2020-11-10 13:53:33 -05:00
: office-selection
clear
echo "Which of these do you need?"
2020-11-10 14:04:01 -05:00
echo "Libreoffice is the recommended choice if you dont know any of these 🖨"
echo ""
echo "1) Libreoffice "
2020-11-10 13:53:33 -05:00
echo "2) Onlyoffice"
echo "3) WPS Office"
echo "4) Free Office"
echo "5) Yozo Office"
read office
if [ $office = "1" ]; then
sudo pacman -S libreoffice-fresh libmythes
goto "start"
elif [ $office = "2" ]; then
sudo pacman -S onlyoffice-bin
goto "start"
elif [ $office = "3" ]; then
sudo pacman -S wps-office wps-office-mime ttf-wps-fonts
goto "start"
elif [ $office = "4" ]; then
sudo pacman -S freeoffice
goto "start"
elif [ $office = "5" ]; then
sudo pacman -S yozo-office yozo-office-fonts
goto "start"
else echo "Thats not a valid choice! ❌"
goto "office-selection"
fi
elif [ $selection = "11" ]; then
clear
sudo pacman -S --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?"
2020-11-10 14:04:01 -05:00
echo ""
2020-11-10 13:53:33 -05:00
echo "1) Virtualbox all the way!"
echo "2) Id rather choose Virt-manager."
read virt
if [ $virt = "1" ]; then
sudo pacman -S garuda-virtualbox
goto "start"
elif [ $virt = "2" ]; then
sudo pacman -S garuda-virt-manager
goto "start"
else echo "Thats not a valid choice! ❌"
goto "virt-selection"
fi
elif [ $selection = "13" ]; then
2020-10-03 11:50:23 -04:00
exit
2020-10-06 09:42:47 -04:00
else echo "Thats not a valid choice! ❌"
2020-10-03 11:50:23 -04:00
goto "start"
fi