-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.mac.sh
executable file
·54 lines (42 loc) · 1.39 KB
/
install.mac.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env bash
### Prep
if [[ "$(uname)" != "Darwin"* ]]; then
echo "Unsupported system: $(uname)"
exit 1
fi
### Install utils
UTILS=(direnv ripgrep neovim fzf tig fd diff-so-fancy tmux)
for i in "${UTILS[@]}"
do
if ! command -v $i &> /dev/null; then
echo "--> Installing $i"
brew install $i
fi
done
### Install oh-my-zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
### Apply dotfiles
echo "--> Applying dotfiles"
# chezmoi
# sh -c "$(curl -fsLS chezmoi.io/get)" -- init ifyouseewendy --branch=chezmoi --one-shot
ln -svf ~/.dotfiles/fdignore ~/.fdignore
ln -svf ~/.dotfiles/gitconfig ~/.gitconfig
ln -svf ~/.dotfiles/gitignore ~/.gitignore
ln -svf ~/.dotfiles/rgignore ~/.rgignore
ln -svf ~/.dotfiles/ripgreprc ~/.ripgreprc
ln -svf ~/.dotfiles/tigrc ~/.tigrc
ln -svf ~/.dotfiles/tmux.conf ~/.tmux.conf
ln -svf ~/.dotfiles/vimrc ~/.vimrc
ln -svf ~/.dotfiles/zshrc ~/.zshrc
### Post hooks
# use customized zsh themes
cp ~/.dotfiles/wendi.zsh-theme ~/.oh-my-zsh/themes/
# neovim
ln -s ~/.vimrc ~/.config/nvim/init.vim
# vim-plug
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
nvim --headless +PlugInstall +qa
# tpm
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
$HOME/.tmux/plugins/tpm/bin/install_plugins