Add files
This commit is contained in:
99
setup.sh
Normal file
99
setup.sh
Normal file
@@ -0,0 +1,99 @@
|
||||
#!/bin/bash
|
||||
set -euxo pipefail
|
||||
|
||||
AUR_PACKAGES=(
|
||||
yaru-{gtk,icon,sound}-theme # Theme from Ubuntu
|
||||
consolas-font # Monospace font used by Visual Studio
|
||||
shadowfox-updater # Universal dark mode for Firefox
|
||||
pup-git # Commandline HTML parser (useful for bash scripts)
|
||||
ccls # C++ language server
|
||||
ranger-git # File manager
|
||||
)
|
||||
|
||||
PYTHON_PACKAGES=(
|
||||
# Web scraping libraries
|
||||
requests # HTML requests
|
||||
beautifulsoup4 # HTML parsing
|
||||
|
||||
# Statistics libraries
|
||||
matplotlib # Plotting
|
||||
numpy # Matrix manipulation
|
||||
pandas # Data analysis
|
||||
|
||||
# Tools
|
||||
pylint # Python linter
|
||||
autopep8 # Python formatter
|
||||
gdbgui # GDB frontend
|
||||
ueberzug # Terminal image preview (used by ranger)
|
||||
)
|
||||
|
||||
function set_gnome_settings {
|
||||
# Set yaru theme
|
||||
gsettings set org.gnome.desktop.interface enable-animations false
|
||||
gsettings set org.gnome.desktop.interface gtk-theme Yaru-dark
|
||||
gsettings set org.gnome.desktop.interface cursor-theme Yaru
|
||||
gsettings set org.gnome.desktop.interface icon-theme Yaru
|
||||
|
||||
# Disable animations
|
||||
gsettings set org.gnome.desktop.sound theme-name Yaru
|
||||
|
||||
# Set dvorak-programmer layout
|
||||
gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'us+dvp')]"
|
||||
|
||||
# Set caps to ctrl
|
||||
gsettings set org.gnome.desktop.input-sources xkb-options "['ctrl:nocaps']"
|
||||
|
||||
# Change keyboard delay and speed
|
||||
gsettings set org.gnome.desktop.peripherals.keyboard delay 250
|
||||
gsettings set org.gnome.desktop.peripherals.keyboard repeat-interval 25
|
||||
|
||||
# Enable night light
|
||||
gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled true
|
||||
|
||||
# Sort directories before files
|
||||
gsettings set org.gtk.Settings.FileChooser sort-directories-first true
|
||||
}
|
||||
|
||||
function set_firefox_settings {
|
||||
local prefs_file=$(ls ~/.mozilla/firefox/*release/prefs.js)
|
||||
|
||||
# Make shadowfox work on FF69
|
||||
sed -i 's/\("toolkit.legacyUserProprefs_fileCustomizations.stylesheets", \)true/\1true/' "${prefs_file}"
|
||||
sed -i 's/\("browser.in-content.dark-mode", \)false/\1true/' "${prefs_file}"
|
||||
|
||||
# Enable some privacy features
|
||||
sed -i 's/\("privacy.firstparty.isolate", \)false/\1true/' "${prefs_file}"
|
||||
sed -i 's/\("privacy.resistFingerprinting", \)false/\1true/' "${prefs_file}"
|
||||
|
||||
# Disable some spying features
|
||||
sed -i 's/\("browser.send_pings", \)true/\1false/' "${prefs_file}"
|
||||
sed -i 's/\("dom.event.clipboardevents.enabled", \)true/\1false/' "${prefs_file}"
|
||||
sed -i 's/\("media.navigator.enabled.stylesheets", \)true/\1false/' "${prefs_file}"
|
||||
}
|
||||
|
||||
|
||||
# Check internet connection
|
||||
ping -w1 -c1 google.com || exit 1
|
||||
|
||||
# Enable pacman colors
|
||||
sudo sed -i 's/#Color/Color/' /etc/pacman.conf
|
||||
|
||||
# Install yay if not installed
|
||||
if ! pacman -Qi yay; then
|
||||
git clone http://aur.archlinux.org/yay.git
|
||||
cd yay
|
||||
makepkg -si --noconfirm
|
||||
cd ..
|
||||
rm -rf yay
|
||||
fi
|
||||
|
||||
yay -Sy --noconfirm --needed ${AUR_PACKAGES[*]}
|
||||
pip install --user ${PYTHON_PACKAGES[*]}
|
||||
|
||||
# Install vim-plug
|
||||
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
|
||||
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
|
||||
set_gnome_settings
|
||||
set_firefox_settings
|
||||
|
||||
Reference in New Issue
Block a user