153 lines
4.9 KiB
Bash
153 lines
4.9 KiB
Bash
|
#!/bin/bash
|
||
|
|
||
|
# A Bash script ofr installing all my openSUSE tools
|
||
|
clear
|
||
|
echo "This script will reconfigure your system and install multiple applications and dependencies."
|
||
|
echo "You probably don't want this unless you're me!"
|
||
|
echo
|
||
|
echo "Press Ctrl-C to cancel or Enter to continue."
|
||
|
read
|
||
|
|
||
|
sudo echo "Starting setup..."
|
||
|
|
||
|
# Set hostname
|
||
|
echo
|
||
|
echo "Setting hostname..."
|
||
|
echo -n "Enter your desired hostname and press [ENTER]: "
|
||
|
read PICKED_HOSTNAME
|
||
|
sudo hostnamectl set-hostname $PICKED_HOSTNAME
|
||
|
echo "Your hostname is now \"$(hostname)\""
|
||
|
|
||
|
# Git
|
||
|
sudo zypper --non-interactive install git
|
||
|
|
||
|
# Git Settings
|
||
|
echo -n "Enter your GIT name: "; read GIT_NAME
|
||
|
echo -n "Enter your GIT email: "; read GIT_EMAIL
|
||
|
git config --global user.name "$GIT_NAME"
|
||
|
git config --global user.email "$GIT_EMAIL"
|
||
|
|
||
|
# Make sure we're up to date
|
||
|
echo
|
||
|
echo "Updating system..."
|
||
|
sudo zypper --non-interactive update
|
||
|
sudo zyppper --non-interactive dup
|
||
|
|
||
|
# NVIDIA Drivers
|
||
|
echo
|
||
|
echo "Installing proprietary NVIDIA drivers..."
|
||
|
sudo zypper --non-interactive install openSUSE-repos-Tumbleweed-NVIDIA
|
||
|
sudo zupper --non-interactive install-new-recommends --repo repo-non-free
|
||
|
|
||
|
# NVIDIA Settings
|
||
|
echo
|
||
|
echo "Installing NVIDIA settings..."
|
||
|
sudo zypper --non-interactive install nvidia-utils*
|
||
|
|
||
|
# Media Codecs
|
||
|
# Nothing to do
|
||
|
|
||
|
# Language, Time & Date
|
||
|
# Sets system to English, currency, dates etc. to Swedish
|
||
|
echo
|
||
|
echo "Setting system language to English and region to Sweden..."
|
||
|
su -c 'echo -ne "LANG=en_US.UTF-8\nLANGUAGE=en_US:en\nLC_CTYPE=\"en_US.UTF-8\"\nLC_NUMERIC=sv_SE.UTF-8\nLC_TIME=sv_SE.UTF-8\nLC_COLLATE=\"en_US.UTF-8\"\nLC_MONETARY=sv_SE.UTF-8\nLC_MESSAGES=en_US.UTF-8\nLC_PAPER=sv_SE.UTF-8\nLC_NAME=sv_SE.UTF-8\nLC_ADDRESS=sv_SE.UTF-8\nLC_TELEPHONE=sv_SE.UTF-8\nLC_MEASUREMENT=sv_SE.UTF-8\nLC_IDENTIFICATION=sv_SE.UTF-8\nLC_ALL=" > /etc/locale.conf'
|
||
|
|
||
|
# Theme
|
||
|
echo ""
|
||
|
echo "Installing Dracula theme..."
|
||
|
sudo git clone https://github.com/dracula/gtk.git /usr/share/themes/Dracula
|
||
|
|
||
|
# Force dark mode in GNOME
|
||
|
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
|
||
|
|
||
|
# Icons
|
||
|
git clone https://github.com/vinceliuice/vimix-icon-theme.git ~/vimix && cd ~/vimix && sudo ./install.sh -a && rm -rf ~/vimix`
|
||
|
|
||
|
# Font Manager
|
||
|
sudo zypper --non-interactive install font-manager && sudo zypper --non-interactive remove gnome-font-viewer
|
||
|
|
||
|
# Nerd Fonts
|
||
|
|
||
|
# Hack
|
||
|
curl -fLo font.tar.xz \
|
||
|
https://github.com/ryanoasis/nerd-fonts/releases/latest/download/Hack.tar.xz && \
|
||
|
sudo mkdir -p /usr/share/fonts/Hack && sudo tar -xf font.tar.xz -C /usr/share/fonts/Hack && \
|
||
|
rm -f font.tar.xz`
|
||
|
|
||
|
# Segoe UI
|
||
|
curl -fLo font.zip \
|
||
|
https://aka.ms/SegoeUIVariable && \
|
||
|
sudo mkdir -p /usr/share/fonts/SegoeUI && sudo unzip -o font.zip -d /usr/share/fonts/SegoeUI && \
|
||
|
rm -f font.zip
|
||
|
|
||
|
# FiraCode
|
||
|
curl -fLo font.tar.xz \
|
||
|
https://github.com/ryanoasis/nerd-fonts/releases/latest/download/FiraCode.tar.xz && \
|
||
|
sudo mkdir -p /usr/share/fonts/FiraCode && sudo tar -xf font.tar.xz -C /usr/share/fonts/FiraCode && \
|
||
|
rm -f font.tar.xz
|
||
|
|
||
|
# Cascadia Cove/Code
|
||
|
curl -fLo font.tar.xz \
|
||
|
https://github.com/ryanoasis/nerd-fonts/releases/latest/download/CascadiaCode.tar.xz && \
|
||
|
sudo mkdir -p /usr/share/fonts/CascadiaCove && sudo tar -xf font.tar.xz -C /usr/share/fonts/CascadiaCove && \
|
||
|
rm -f font.tar.xz
|
||
|
|
||
|
# JetBrainsMono
|
||
|
curl -fLo font.tar.xz \
|
||
|
https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.tar.xz && \
|
||
|
sudo mkdir -p /usr/share/fonts/JetBrainsMono && sudo tar -xf font.tar.xz -C /usr/share/fonts/JetBrainsMono && \
|
||
|
rm -f font.tar.xz
|
||
|
|
||
|
# GNOME Accessibility
|
||
|
sudo zypper --non-interactive install at-spi2-core
|
||
|
|
||
|
# Wine
|
||
|
sudo zypper --non-interactive install -l wine wine-gecko wine-mono dosbox winetricks
|
||
|
wine start cmd /c exit
|
||
|
|
||
|
# Wine Associations
|
||
|
echo -e "\n\n[Default Applications]\napplication/x-ms-dos-executable=wine.desktop;\napplication/vnd.microsoft.portable-executable=wine.desktop;\napplication/x-msdownload=wine.desktop;" >> "$HOME/.config/mimeapps.list"
|
||
|
|
||
|
# Thunderbird
|
||
|
sudo zypper --non-interactive install thunderbird
|
||
|
|
||
|
# Vim
|
||
|
sudo zypper --non-interactive install vim gvim
|
||
|
mkdir -p ~/.vim
|
||
|
touch ~/.vim/vimrc
|
||
|
|
||
|
# Albert
|
||
|
sudo zypper --non-interactive addrepo --refresh https://download.opensuse.org/repositories/home:manuelschneid3r/openSUSE_Tumbleweed/home:manuelschneid3r.repo
|
||
|
sudo zypper --non-interactive install albert
|
||
|
|
||
|
# Albert Autostart
|
||
|
mkdir -p ~/.config/autostart
|
||
|
cat <<EOF > ~/.config/autostart/albert.desktop
|
||
|
[Desktop Entry]
|
||
|
Type=Application
|
||
|
Name=Albert
|
||
|
Exec=albert
|
||
|
EOF
|
||
|
|
||
|
# Alacritty
|
||
|
sudo zypper --non-interactive install alacritty
|
||
|
|
||
|
# Bitwarden
|
||
|
sudo zypper --non-interactive install bitwarden
|
||
|
|
||
|
# Telegram
|
||
|
curl -o "$HOME/Downloads/telegram.tar.xz" https://telegram.org/dl/desktop/linux -L
|
||
|
sudo tar -xf "$HOME/Downloads/telegram.tar.xz" -C "/opt"
|
||
|
rm "$HOME/Downloads/telegram.tar.xz"
|
||
|
sudo ln -s "/opt/Telegram/Telegram" "/usr/bin/telegram-desktop"
|
||
|
# Start Telegram to get a .desktop file, then close it
|
||
|
telegram-desktop -startintray &
|
||
|
sleep 5
|
||
|
killall telegram-desktop
|
||
|
|
||
|
# Steam
|
||
|
sudo zypper --non-interactive install -l steam
|
||
|
|
||
|
|