Quick-Linux-Setup/run.sh

142 lines
5.4 KiB
Bash
Raw Permalink Normal View History

2024-09-01 22:24:48 -04:00
#!/usr/bin/env bash
set -e
2024-09-12 23:48:20 -04:00
# Check if it was ran with "sudo" or not
2024-09-01 22:24:48 -04:00
if [[ $(id -u) != 0 ]]; then
2024-09-01 23:15:54 -04:00
echo "Please run script with 'sudo'"
2024-09-13 01:24:34 -04:00
echo "Try 'sudo su'"
2024-09-01 22:24:48 -04:00
exit 1
fi
2024-09-12 23:48:20 -04:00
# Init
clear
echo "Updating your system..."
sudo dnf update --quiet --refresh --allowerasing -y
2024-09-13 21:10:33 -04:00
# Dotfiles
cd ~/
wget https://ark.sudovanilla.org/Korbs/Quick-Linux-Setup/raw/branch/main/configs/.npmrc
# Apply GNOME Settings
clear
echo "Changing settings for GNOME..."
echo "Enabling dark mode..."
gsettings set org.gnome.desktop.interface color-scheme "prefer-dark"
sleep 2
echo "Turning off mouse acceleration..."
gsettings set org.gnome.desktop.peripherals.mouse accel-profile 'flat'
sleep 2
echo "Filehistory will clear every week..."
gsettings set org.gnome.desktop.privacy recent-files-max-age 7
sleep 2
echo "Trash and temporary files will clear every week..."
gsettings set org.gnome.desktop.privacy old-files-age 7
sleep 2
gsettings set org.gnome.desktop.privacy remove-old-temp-files true
sleep 2
gsettings set org.gnome.desktop.privacy remove-old-trash-files true
sleep 2
gsettings set org.gnome.desktop.interface enable-hot-corners false
sleep 2
2024-09-01 22:24:48 -04:00
# Uninstall Apps and Packages
2024-09-12 23:48:20 -04: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 22:24:48 -04:00
# Install Apps
2024-09-12 23:48:20 -04:00
clear
echo "Installing applications..."
2024-09-01 22:24:48 -04:00
sudo dnf config-manager --add-repo https://repository.mullvad.net/rpm/stable/mullvad.repo
2024-09-12 23:48:20 -04: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 22:24:48 -04:00
# Install Packages
2024-09-12 23:48:20 -04:00
clear
echo "Installing Nautilus and ADB..."
sudo dnf install --quiet -y nautilus adb fastboot
clear
echo "Installing Bun..."
2024-09-01 22:24:48 -04:00
2024-09-01 22:55:14 -04:00
curl -fsSL https://bun.sh/install | bash
source ~/.bashrc
2024-09-12 23:48:20 -04:00
clear
echo "Installing NodeJS..."
2024-09-13 21:10:33 -04:00
sudo dnf install nodejs -y --quiet
2024-09-01 22:24:48 -04:00
2024-09-12 23:48:20 -04:00
# Patches and Apply
clear
echo "Patching Spotify, Nautilus, and Librewolf..."
## Spotify
2024-09-13 21:10:33 -04:00
bash <(curl -sSL https://spotx-official.github.io/run.sh) -h -d -f
2024-09-01 23:15:54 -04:00
2024-09-12 23:48:20 -04:00
## Nautilus
2024-09-13 21:10:33 -04:00
sudo dnf install nautilus-python -y --quiet
2024-09-12 23:48:20 -04:00
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
# Settings
clear
echo "Applying Settings for VSCodium and Blackbox..."
## VSCodium
2024-09-13 21:10:33 -04:00
echo "Generating files for VSCodium..."
flatpak run com.raggesilver.BlackBox --command "flatpak run com.vscodium.codium"
echo "Just close it."
2024-09-01 23:15:54 -04: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 23:48:20 -04:00
## Blackbox
2024-09-13 21:10:33 -04:00
echo "Generating files for Blackbox..."
flatpak run com.raggesilver.BlackBox --command "flatpak run com.raggesilver.BlackBox"
echo "Just close it."
2024-09-12 23:48:20 -04:00
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 23:15:54 -04:00
# GNOME Extensions (Currently set for GNOME 46)
2024-09-12 23:48:20 -04:00
clear
echo "Installing GNOME extensions..."
2024-09-01 23:15:54 -04:00
cd ~/Downloads/
wget https://extensions.gnome.org/extension-data/gsconnectandyholmes.github.io.v57.shell-extension.zip
2024-09-12 23:48:20 -04:00
wget https://extensions.gnome.org/extension-data/rounded-window-cornersfxgn.v3.shell-extension.zip
2024-09-13 01:24:34 -04:00
clear
echo "Restarting GNOME is required, please restart the session soon."
2024-09-13 21:10:33 -04:00
echo "After restarting the session, run 'sh ./enable-extensions.sh'"
2024-09-13 01:24:34 -04:00
sleep 5
2024-09-12 23:48:20 -04: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 01:24:34 -04: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"