#!/bin/bash -e # Enable multilib & add extra repos {{{ sudo cp /etc/pacman.conf{,.bak} sudo sed -i /etc/pacman.conf \ -e 's/^#\(Color\)/\1\nILoveCandy/' \ -e '/\[multilib\]/,/Include/s/^#//' \ -e '$ a [quarry]\nServer = https://pkgbuild.com/~anatolik/quarry/x86_64/' # }}} # Update system and install basic packages {{{ sudo pacman-key --init sudo pacman-key --populate archlinux sudo pacman -Syyu sudo pacman -S base-devel git aria2 reflector go --noconfirm git clone https://aur.archlinux.org/yay.git /tmp/yay (cd /tmp/yay && makepkg -sic --noconfirm) git clone https://github.com/alfunx/dotfiles.sh \ --single-branch --branch=sparse-edit /tmp/dotfiles.sh (cd /tmp/dotfiles.sh && sudo make install) # }}} # Clone dotfiles {{{ mkdir -p ~/Documents/Code/GitHub dotfiles clone https://github.com/ObserverOfTime/home.files \ ~/Documents/Code/GitHub/home.files && dotfiles checkout -f # }}} # Rank pacman mirrors {{{ sudo cp /etc/pacman.d/mirrorlist{,.bak} REF_OPTS=('--country GR' '--country DE' '--country FR' '--protocol https' '--protocol ftp' '--age 12' '--sort rate' '--save /etc/pacman.d/mirrorlist') # shellcheck disable=SC2068 sudo reflector ${REF_OPTS[@]} sudo mkdir -p /etc/pacman.d/hooks sudo tee /etc/pacman.d/hooks/mirrorupgrade.hook >/dev/null </dev/null <> "$DIRECTORY/ffmpeg" printf 'complete -o default -F _clang clang++\n' >> "$DIRECTORY/clang" printf 'complete -o default -F __bundle bundler\n' >> "$DIRECTORY/bundle" for key in "${!ALIASES[@]}"; do ln -fvs "$DIRECTORY/${ALIASES[$key]}" "$DIRECTORY/$key" done grunt --completion=bash > "$DIRECTORY/grunt" gulp --completion=bash > "$DIRECTORY/gulp" pandoc --bash-completion > "$DIRECTORY/pandoc" poetry completions bash > "$DIRECTORY/poetry" ln -fvs "$(gem contents travis | grep 'travis.sh$')" "$DIRECTORY/travis" ln -fvs /usr/share/fzf/completion.bash "$DIRECTORY/fzf" unset -f DIRECTORY ALIASES raw # }}} # Install from github reporisotories {{{ clone() { hub clone --depth=1 "$@" "/tmp/${1##*/}"; } clone eli-schwartz/dotfiles.sh (cd /tmp/dotfiles.sh && sudo make) clone rkitover/vimpager (cd /tmp/vimpager && sudo make PREFIX=/usr/local docs install) clone ObserverOfTime/sddm-patema sudo -E /tmp/sddm-patema/install.sh # clone ObserverOfTime/PKGBUILDS # TODO: wait for Jguer/yay#694 # }}} # Configure grub {{{ THEME=/boot/grub/themes/Lain SWAP="$(swapon --show=NAME --noheadings)" SWAP="${SWAP+ resume=$SWAP}" clone ObserverOfTime/grub2-theme-lain sudo cp -r /tmp/grub2-theme-lain/Lain "$THEME" sudo cp /etc/default/grub{,.bak} sudo tee /etc/default/grub >/dev/null <\\ \${env.XDG_CACHE_HOME}/maven/repository\\ " # }}} # Setup neovim {{{ nvim --headless +q >/dev/null nvim --headless +PlugInstall +qa >/dev/null # }}} # Setup mozilla profiles {{{ mkdir -p ~/.thunderbird ~/.mozilla/firefox rclone sync -vv Mega:/Thunderbird \ ~/.thunderbird/o8q08m34.default cat > ~/.thunderbird/profiles.ini <<'EOF' [Profile0] Name=default IsRelative=1 Path=o8q08m34.default EOF rclone sync -vv Mega:/Firefox \ ~/.mozilla/firefox/6fgcqba8.dev-edition-default cat > ~/.mozilla/firefox/profiles.ini <<'EOF' [Profile0] Name=dev-edition-default IsRelative=1 Path=6fgcqba8.dev-edition-default EOF sudo tee /etc/pacman.d/hooks/firefox.hook >/dev/null </dev/null <<'EOF' KEYMAP=us FONT=ter-v18n FONT_MAP=8859-2 EOF sudo sed -i /etc/mkinitcpio.conf \ -re 's/(^HOOKS="[^"]*)"/\1 consolefont"/' sudo mkinitcpio -p linux # }}} # vim:fdm=marker:fdl=0: