Quick-Linux-Setup/run.sh

128 lines
5 KiB
Bash
Raw Normal View History

2024-09-01 21:24:48 -05:00
#!/usr/bin/env bash
set -e
2024-09-12 22:48:20 -05:00
# Check if it was ran with "sudo" or not
2024-09-01 21:24:48 -05:00
if [[ $(id -u) != 0 ]]; then
2024-09-01 22:15:54 -05:00
echo "Please run script with 'sudo'"
2024-09-13 00:24:34 -05:00
echo "Try 'sudo su'"
2024-09-01 21:24:48 -05:00
exit 1
fi
2024-09-12 22:48:20 -05:00
# Init
clear
echo "Updating your system..."
sudo dnf update --quiet --refresh --allowerasing -y
2024-09-01 21:24:48 -05:00
# Uninstall Apps and Packages
2024-09-12 22:48:20 -05:00
clear
echo "Removing unused content and applications..."
sudo dnf remove --quiet -y firef* firew* anaconda document-scanner fedora-bookmarks fedora-chromium-config gnome-clocks gnome-color-manager gnome-contacts gnome-getting-started-docs gnome-initial-setup gnome-maps gnome-online-miners gnome-remote-desktop gnome-user-docs gnome-weather gnome-characters gnome-classic-session gnome-classic-session-xsession gnome-color-manager gnome-connections gnome-disk-utility gnome-font-viewer gnome-logs gnome-shell-extension-apps-menu gnome-shell-extension-background-logo gnome-shell-extension-common gnome-shell-extension-launch-new-instance gnome-shell-extension-places-menu gnome-shell-extension-window-list gnome-system-monitor gnome-terminal gnome-text-editor gnome-tour ibus-hangul ibus-kkc ibus-libpinyin ibus-libzhuyin ibus-m17n ibus-typing-booster khmeros-base-fonts libreoffice-calc libreoffice-impress libreport problem-reporting rhythmbox sane-airscan simple-scan speech-dispatcher thai-scalable-waree-fonts totem tracker yelp
2024-09-01 21:24:48 -05:00
# Install Apps
2024-09-12 22:48:20 -05:00
clear
echo "Installing applications..."
2024-09-01 21:24:48 -05:00
sudo dnf config-manager --add-repo https://repository.mullvad.net/rpm/stable/mullvad.repo
2024-09-12 22:48:20 -05:00
sudo dnf install --quiet -y mullvad-vpn openssl
flatpak install -y com.vscodium.codium io.gitlab.librewolf-community com.spotify.Client com.belmoussaoui.Obfuscate network.loki.Session org.videolan.VLC org.nickvision.tubeconverter cafe.avery.Delfin de.haeckerfelix.Fragments org.gnome.gitlab.YaLTeR.VideoTrimmer com.github.tchx84.Flatseal org.shotcut.Shotcut com.raggesilver.BlackBox com.github.neithern.g4music net.nokyan.Resources
2024-09-01 21:24:48 -05:00
# Install Packages
2024-09-12 22:48:20 -05:00
clear
echo "Installing Nautilus and ADB..."
sudo dnf install --quiet -y nautilus adb fastboot
clear
echo "Installing Bun..."
2024-09-01 21:24:48 -05:00
2024-09-01 21:55:14 -05:00
curl -fsSL https://bun.sh/install | bash
source ~/.bashrc
2024-09-12 22:48:20 -05:00
clear
echo "Installing NodeJS..."
2024-09-01 21:24:48 -05:00
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
2024-09-01 21:55:14 -05:00
source ~/.bashrc
2024-09-01 21:24:48 -05:00
nvm install node
2024-09-12 22:48:20 -05:00
# Patches and Apply
clear
echo "Patching Spotify, Nautilus, and Librewolf..."
## Spotify
2024-09-01 22:15:54 -05:00
bash <(curl -sSL https://spotx-official.github.io/run.sh) -h -d
2024-09-12 22:48:20 -05:00
## Nautilus
git clone https://github.com/ppvan/nautilus-open-in-blackbox.git
cd nautilus-open-in-blackbox
./install.sh
## Librewolf
curl -s -o- https://raw.githubusercontent.com/rafaelmardojai/firefox-gnome-theme/master/scripts/install-by-curl.sh | bash
# Dotfiles
cd ~/
wget https://ark.sudovanilla.org/Korbs/Quick-Linux-Setup/raw/branch/main/configs/.npmrc
# Settings
clear
echo "Applying Settings for VSCodium and Blackbox..."
## VSCodium
2024-09-01 22:15:54 -05:00
cd /home/korbs/.var/app/com.vscodium.codium/config/VSCodium/User
wget https://ark.sudovanilla.org/Korbs/Quick-Linux-Setup/raw/branch/main/configs/vscodium.json
sudo rm settings.json
sudo mv vscodium.json settings.json
2024-09-12 22:48:20 -05:00
## Blackbox
cd /home/korbs/.var/app/com.raggesilver.BlackBox/config/glib-2.0/settings
wget https://ark.sudovanilla.org/Korbs/Quick-Linux-Setup/raw/branch/main/configs/blackbox.keyfile
sudo rm keyfile
sudo mv blackbox.keyfile keyfile
2024-09-01 22:15:54 -05:00
# GNOME Extensions (Currently set for GNOME 46)
2024-09-12 22:48:20 -05:00
clear
echo "Installing GNOME extensions..."
2024-09-01 22:15:54 -05:00
cd ~/Downloads/
wget https://extensions.gnome.org/extension-data/gsconnectandyholmes.github.io.v57.shell-extension.zip
2024-09-12 22:48:20 -05:00
wget https://extensions.gnome.org/extension-data/rounded-window-cornersfxgn.v3.shell-extension.zip
2024-09-13 00:24:34 -05:00
gnome-extensions enable gsconnect@andyholmes.github.io
gnome-extensions enable rounded-window-corners@fxgn
clear
echo "Restarting GNOME is required, please restart the session soon."
sleep 5
# Apply GNOME Settings
clear
echo "Changing settings for GNOME..."
gsettings set org.gnome.desktop.interface color-scheme "prefer-dark"
gsettings set org.gnome.desktop.peripherals.mouse accel-profile 'flat'
gsettings set org.gnome.desktop.privacy recent-files-max-age 7
gsettings set org.gnome.desktop.privacy old-files-age 7
gsettings set org.gnome.desktop.privacy remove-old-temp-files true
gsettings set org.gnome.desktop.privacy remove-old-trash-files true
gsettings set org.gnome.desktop.interface enable-hot-corners false
2024-09-12 22:48:20 -05:00
# Ending-Run
clear
echo "Finishing up..."
sudo dnf autoremove
sudo dnf clean all
# After-Run
echo "Completed."
sleep 2
echo "Don't forget to setup Git:"
echo 'git config --global user.name "USERNAME"'
2024-09-13 00:24:34 -05:00
echo 'git config --global user.email "email@example.org"'
echo ""
echo "Some settings need to be modified in Librewolf 'about:config'. Enable the following:"
echo "gnomeTheme.hideSingleTab"
echo "gnomeTheme.bookmarksToolbarUnderTabs"
echo "gnomeTheme.closeOnlySelectedTabs"
echo "gnomeTheme.systemIcons"
echo "gnomeTheme.hideWebrtcIndicator"
echo ""
echo "For the LibRedirect extension, the configuration is available here:"
echo "https://ark.sudovanilla.org/Korbs/Quick-Linux-Setup/raw/branch/main/configs/libredirect-settings-v2.9.0.json"