-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain_setup.sh
93 lines (82 loc) · 4.58 KB
/
main_setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/bin/bash
# SETUP SCRIPT FOR DEBIAN/UBUNTU BASED DISTROS USING APT
# NALA
# sudo apt install -y nala curl && sudo nala fetch && sudo nala update && sudo nala upgrade -y
# DE-SNAP UBUNTU-DERVIATIVES
if [ -n "$(uname -a | grep buntu)" ]; then
sudo snap remove firefox && sudo snap remove gtk-common-themes && sudo snap remove gnome-42-2204 && sudo snap remove thunderbird && sudo snap remove firmware-updater && sudo snap remove bare && sudo snap remove core22
sudo snap remove snapd && sudo systemctl stop snapd && sudo systemctl disable snapd && sudo apt purge snapd -y && sudo apt-mark hold snapd
sudo rm -rf ~/snap && sudo rm -rf /snap && sudo rm -rf /var/snap && sudo rm -rf /var/lib/snapd
sudo cat <<EOF | sudo tee /etc/apt/preferences.d/nosnap.pref
Package: snapd
Pin: release a=*
Pin-Priority: -10
EOF
fi
# BRAVE
sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main"|sudo tee /etc/apt/sources.list.d/brave-browser-release.list
sudo apt update && sudo apt install -y brave-browser
# FLATPAK INSTALLS
sudo apt install -y flatpak && sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
sudo flatpak install -y --noninteractive --system org.gtk.Gtk3theme.Breeze && sudo flatpak override --filesystem=xdg-config/gtk-3.0:ro
sudo flatpak install flathub -y com.usebottles.bottles # Only available as Flatpak
sudo flatpak override com.usebottles.bottles --user --filesystem=xdg-data/applications # Allows access elsewhere
sudo flatpak install flathub net.lutris.Lutris # Without Flatpak it requires Wine installed and we use Bottles
sudo flatpak install flathub io.github.dosbox-staging # PPA isnt updated
sudo flatpak install flathub org.libretro.RetroArch # No particular reason
sudo flatpak install flathub com.valvesoftware.Steam # Means dont need to add 32bit multiverse
# GPU SPECIFICS
gpu=$(lspci | grep -i '.* vga .* nvidia .*') && shopt -s nocasematch
if [[ $gpu == *' nvidia '* ]]; then
printf 'Installing Nvidia GPU bits: %s\n'
sudo ubuntu-drivers install && flatpak --user install flathub com.leinardi.gwe && sudo flatpak update # need to ensure latest org.freedesktop.Platform.GL.nvidia
else
printf 'AMD - all golden%s\n'
fi
# INSTALLS & TWEAKS
sudo apt update
wget https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/releases/download/v2.14.1/heroic_2.14.1_amd64.deb && sudo dpkg -i heroic_*_amd64.deb && rm ~/Downloads/heroic_*_amd64.deb
sudo apt install -y neofetch bleachbit ufw python3-pip mc libavcodec-extra git ncdu gamemode hunspell-en-gb vlc powertop steam-devices localepurge
sudo apt purge -y hunspell-en-us thunderbird transmission-cli transmission-qt pidgin pidgin-extprefs pidgin-gnome-keyring pidgin-otr pidgin-plugin-pack firefox-esr synaptic # Spiral specifics
sudo apt purge -y ktorrent kmahjongg ksudoku # Kubuntu specifics
sudo systemctl disable NetworkManager-wait-online.service # Just for Ubuntu derivatives? sudo systemd-analyze critical-chain indicates they waste 5s on boot
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections && sudo apt install -y ttf-mscorefonts-installer
# TIDY UP & UPGRADES
sudo apt upgrade -y && sudo apt clean && sudo apt autoremove -y && sudo apt autopurge -y
sudo printf "neofetch" >> /home/$USER/.bashrc && sudo timedatectl set-local-rtc 1 --adjust-system-clock
echo -n "KDE Plasma specific customizations"
sudo python3 -m pip install konsave --break-system-packages
sudo nala install -y plasma-discover-backend-flatpak plasma-discover
exit
# POWER TUNING
wget https://github.com/methanoid/setup/blob/main/powertuning.sh
sudo sh ./powertuning.sh
# CONF files?
# make konsole & BRAVE favouriteS
# screen locking,sleep settings
# .local/share/user-places.xbel # copy this to add unRAID to Dolphin places
# DESKTOP SPECIFICS
case $XDG_SESSION_DESKTOP in
KDE)
echo -n "KDE Plasma specific customizations"
sudo python3 -m pip install konsave --break-system-packages
sudo nala install -y plasma-discover-backend-flatpak plasma-discover
;;
Gnome)
echo -n "Gnome specific customizations"
sudo nala install -y gnome-software-plugin-flatpak
;;
X-Cinnamon)
echo -n "Cinnamon specific customizations"
;;
XFCE)
echo -n "XFCE specific customizations"
;;
Budgie)
echo -n "Budgie specific customizations"
;;
*)
echo -n "Desktop Unknown!!!"
;;
esac