#!/usr/bin/env bash set -euo pipefail STOW="stow -R --no-folding" cd "$(dirname $0)" git submodule update --init --recursive --depth 1 touch ~/.zshrc.local touch ~/.zshenv.local $STOW common $STOW zsh $STOW direnv $STOW xbindkeys $STOW emacs touch $HOME/.zshrc.local source $HOME/.zshenv if which xmonad >/dev/null; then $STOW desktop touch ~/.Xresources.local xrdb -I$HOME -merge ~/.Xresources xmonad --recompile fi if [[ $# -ge 1 && $1 == "fast" ]]; then shift exit fi if [[ ! -e ~/.config/emacs ]]; then git clone https://github.com/plexus/chemacs2.git ~/.config/emacs fi doom_path=~/build/doom-emacs if which emacs >/dev/null && [[ ! -e $doom_path ]]; then git clone https://github.com/plexus/chemacs2.git ~/.config/emacs unset DOOMDIR unset EMACSDIR git clone --depth 1 https://github.com/hlissner/doom-emacs $doom_path $doom_path/bin/doom install $doom_path/bin/doom sync # Too slow! fi fc-cache || true tools=( rg fzf bat most direnv emacs git zoxide rofi # for emacs everywhere xwininfo xclip xbindkeys xvkbd ) for tool in "${tools[@]}"; do if ! type "$tool" &>/dev/null; then echo "Missing: $tool" fi done