1
0
Fork 0
mirror of synced 2024-11-22 01:55:36 -05:00

Eyecandy assistant + remove unneeded sudo permissions

This commit is contained in:
Nico Jensch 2020-11-11 16:18:59 +01:00
parent ac5679f47e
commit 38aa5990bc

View file

@ -24,8 +24,8 @@ function upgrade2ultimate
clear clear
echo "What about Snaps, Flatpak & Appimage support? (y,n)" echo "What about Snaps, Flatpak & Appimage support? (y,n)"
echo "This enables you to use software not available in Chaotic-AUR." echo "This enables you to use software not available in our repos."
echo "If an application is available already we advise to use the version in the repo." echo "If an application is available we advise to use the native version!"
read snap read snap
if [ $snap = "y" ]; then if [ $snap = "y" ]; then
echo "sudo pacman -R pamac-aur pamac-tray-appindicator" >> /tmp/setup-assistant/prepare.sh echo "sudo pacman -R pamac-aur pamac-tray-appindicator" >> /tmp/setup-assistant/prepare.sh
@ -36,18 +36,21 @@ function upgrade2ultimate
snapd snapd
snapd-glib snapd-glib
flatpak" >> /tmp/setup-assistant/pkgs.txt flatpak" >> /tmp/setup-assistant/pkgs.txt
echo "sudo systemctl enable --now snapd" >> /tmp/setup-assistant/setup.sh 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
fi fi
clear clear
echo "Do you need gaming applications installed? (y,n)" echo "Do you need gaming applications installed? 🎮 (y,n)"
echo "This will install the Garuda Gamer app in which every component needed to game can be enabled." echo "This will install the Garuda Gamer app in which every component needed to game can be enabled."
echo "" echo ""
read gaming read gaming
if [ $gaming = "y" ]; then if [ $gaming = "y" ]; then
echo "garuda-gamer" >> /tmp/setup-assistant/pkgs.txt echo "garuda-gamer" >> /tmp/setup-assistant/pkgs.txt
echo "systemctl --user enable --now gamemoded >/dev/null 2>&1 &" >> /tmp/setup-assistant/setup.sh echo "systemctl --user enable --now gamemoded >/dev/null 2>&1 &" >> /tmp/setup-assistant/setup.sh
echo "setup_dxvk install 2>&1 &" >> /tmp/setup-assistant/setup.sh echo "sudo setup_dxvk install 2>&1 &" >> /tmp/setup-assistant/setup.sh
fi fi
clear clear
@ -61,10 +64,11 @@ function upgrade2ultimate
garuda-pipewire garuda-pipewire
pulseaudio-ctl pulseaudio-ctl
playerctl" >> /tmp/setup-assistant/pkgs.txt playerctl" >> /tmp/setup-assistant/pkgs.txt
echo "sudo systemctl enable --now bluetooth-autoconnect" >> /tmp/setup-assistant/setup.sh
fi fi
clear clear
echo "Are you printing and scanning with this machine?" echo "Are you printing and scanning with this machine? 🖨"
echo "Also, do you need Samba support? (y,n)" echo "Also, do you need Samba support? (y,n)"
echo "" echo ""
read gaming read gaming
@ -78,7 +82,7 @@ function upgrade2ultimate
clear clear
: office-selection : office-selection
echo "Now you are free to choose your favorite office suite." echo "Now you are free to choose your favorite office suite."
echo "There are quite a lot of them in our repo. A guideline for new users:" echo "There are quite a lot of them to choose from. A guideline for new users:"
echo "LibreOffice is the most used and complete office application in the Linux world." echo "LibreOffice is the most used and complete office application in the Linux world."
echo "If a simpler word processor is fine for you Abiword might also be a good choice." echo "If a simpler word processor is fine for you Abiword might also be a good choice."
echo "" echo ""
@ -113,7 +117,7 @@ function upgrade2ultimate
fi fi
clear clear
echo "This question is about general desktop applications." echo "This question is about general desktop applications. ☁️"
echo "It contains apps such as Telegram, Nextcloud-client & Syncthing." echo "It contains apps such as Telegram, Nextcloud-client & Syncthing."
echo "Are these going to be installed? (y,n)" echo "Are these going to be installed? (y,n)"
read general read general
@ -133,28 +137,28 @@ function upgrade2ultimate
: virt-selection : virt-selection
clear clear
echo "Are you rather a fan of virtualbox or virt-manager?" echo "Are you rather a fan of virtualbox or virt-manager? 💻"
echo "" echo ""
echo "1) Virtualbox all the way!" echo "1) Virtualbox all the way!"
echo "2) Id rather choose Virt-manager." echo "2) Id rather choose Virt-manager."
read virt read virt
if [ $virt = "1" ]; then if [ $virt = "1" ]; then
echo "garuda-virtualbox" >> /tmp/setup-assistant/pkgs.txt echo "garuda-virtualbox" >> /tmp/setup-assistant/pkgs.txt
echo "usermod -aG vboxusers $USER" >> /tmp/setup-assistant/setup.sh echo "sudo usermod -aG vboxusers $USER" >> /tmp/setup-assistant/setup.sh
elif [ $virt = "2" ]; then elif [ $virt = "2" ]; then
echo "garuda-virt-manager" >> /tmp/setup-assistant/pkgs.txt echo "garuda-virt-manager" >> /tmp/setup-assistant/pkgs.txt
echo "sudo systemctl enable --now libvirtd" >> /tmp/setup-assistant/setup.sh echo "sudo systemctl enable --now libvirtd" >> /tmp/setup-assistant/setup.sh
echo "usermod -aG libvirt $USER" >> /tmp/setup-assistant/setup.sh echo "sudo usermod -aG libvirt $USER" >> /tmp/setup-assistant/setup.sh
echo "usermod -aG kvm $USER" >> /tmp/setup-assistant/setup.sh echo "sudo usermod -aG kvm $USER" >> /tmp/setup-assistant/setup.sh
else echo "Thats not a valid choice! ❌" else echo "Thats not a valid choice! ❌"
goto "virt-selection" goto "virt-selection"
fi fi
clear clear
sudo sh /tmp/setup-assistant/prepare.sh sh /tmp/setup-assistant/prepare.sh
cat /tmp/setup-assistant/pkgs.txt | sed '/^$/d;s/[[:blank:]]//g' > /tmp/setup-assistant/pkgs-install.txt 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 sudo pacman --needed -S - < /tmp/setup-assistant/pkgs-install.txt
sudo sh /tmp/setup-assistant/setup.sh sh /tmp/setup-assistant/setup.sh
rm -rf /tmp/setup-assistant rm -rf /tmp/setup-assistant
} }
@ -205,6 +209,6 @@ elif [ $selection = "5" ]; then
upgrade2ultimate upgrade2ultimate
elif [ $selection = "6" ]; then elif [ $selection = "6" ]; then
exit exit
else "Thats not a valid choice!" else "Thats not a valid choice!"
goto "start" goto "start"
fi fi