Update fish + Add GL4D, Latex, Python, Rust, tldr, LFS, Spotify

This commit is contained in:
Mylloon 2022-02-16 17:59:08 +01:00
parent 6fa3f5be43
commit 071d3df7ed
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -1,5 +1,8 @@
#!/usr/bin/env bash
# == Basic dev ==
sudo pacman -S base-devel
# === Yay ===
sudo pacman -S yay --noconfirm
@ -55,6 +58,9 @@ fish -c "abbr vs 'code .'"
fish -c "abbr untgz 'tar -xvzf'"
fish -c "abbr - 'cd -'"
fish -c "abbr cat 'batcat'"
fish -c "abbr bigupdate 'sudo pacman -Syu && yay'"
fish -c "abbr d 'nautilus . -w &> /dev/null & disown'"
fish -c "abbr spotify 'LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify &> /dev/null & disown'"
# Remove fish icon
if [ -f /usr/share/applications/fish.desktop ]
then
@ -64,29 +70,86 @@ fi
# Fish by default in terminal app
# TODO
# GL4D
# == GL4D ==
sudo pacman -S sdl2_image pkg-config automake make autoconf --noconfirm
# Download and build
git clone https://github.com/noalien/GL4Dummies.git
cd GL4Dummies || exit
make -f Makefile.autotools
./configure
make
# Install it
sudo make install
# Remove folder
cd ..
rm -rf GL4Dummies
# Fix for shared libraries (https://stackoverflow.com/a/9395355)
sudo ldconfig
# Add to path
if [ -f "$HOME"/.bashrc ] ; then
echo -e "\n# GL4Dummies\nexport PATH=\$PATH:\$HOME/local/bin\nexport LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$HOME/local/lib\n\n" >> "$HOME"/.bashrc
fi
if [ -f "$HOME"/.zshrc ] ; then
echo -e "\n# GL4Dummies\nexport PATH=\$PATH:\$HOME/local/bin\nexport LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$HOME/local/lib\n\n" >> "$HOME"/.zshrc
fi
if [ -f "$HOME"/.config/fish/config.fish ] ; then
echo -e "\n# GL4Dummies\nset -gx PATH \$HOME/local/bin \$PATH\nset -gx LD_LIBRARY_PATH \$HOME/local/lib $LD_LIBRARY_PATH\n\n" >> "$HOME"/.config/fish/config.fish
fi
# Latex
# == Latex ==
sudo pacman -S texlive-most python-pygments --noconfirm
# Java
# == Python stuff ==
sudo pacman -S python-virtualenv tk --noconfirm
# Python stuff
# Rust
# Sign commits
# == Sign commits ==
git config --global commit.gpgsign true
# tldr
# == Rust ==
curl https://sh.rustup.rs -sSf | sh -s -- -y
source "$HOME"/.cargo/env
# Dev tools
rustup component add rust-analysis
rustup component add rls
# Git LFS
# == tldr ==
cargo install tealdeer
tldr --update
# Fish completion
latest=$(wget -qO- https://api.github.com/repos/dbrgn/tealdeer/releases/latest)
url=$(grep 'browser_download_url": ".*/completions_fish"' <<< "$latest" | awk '{ print substr ($0, 32 ) }' | awk '{ print substr( $0, 1, length($0)-1 ) }')
wget -q --show-progress "$url" -O completions_fish
mv completions_fish ~/.config/fish/completions/tldr.fish
# VSCode
# == Git LFS ==
sudo apt install git-lfs -y
git lfs install
# == VSCode ==
yay -S visual-studio-code-bin --noconfirm
# Spotify + no-ads mod
# == Spotify + no-ads mod ==
yay -S spotify --noconfirm
# Download mod
git clone https://github.com/abba23/spotify-adblock.git
cd spotify-adblock || exit
make
# Install mod
sudo make install
# Remove folder
cd ..
rm -rf spotify-adblock
# Change shortcut
if [ -f /usr/share/applications/spotify.desktop ] ; then
sudo sed -i "7s#.*#Exec=env LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify %U#" /usr/share/applications/spotify.desktop
fi
# Remove banner
cd "$(dirname "$(realpath -L "$(which spotify)")")"/Apps/ || exit # absolute path to Spotify
sudo bash -c "unzip -p xpui.spa xpui.js | sed 's/{adsEnabled:\!0}/{adsEnabled:false}/' > xpui.js"
sudo zip --update xpui.spa xpui.js
sudo rm xpui.js
# Syncthing
# == Syncthing ==
# Discord