-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.sh
executable file
·46 lines (32 loc) · 1.63 KB
/
config.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
#!/usr/bin/env bash
# run brew.sh at first
if [[ -d ~/.config ]]; then
echo "$HOME/.config exists, exit"
exit 1
fi
# create alias to .config
ln -sf "$PWD/.config" "$HOME/.config"
# ---------------------------------------- zsh ---------------------------------------- #
echo "=============================== Configure zsh ==============================="
rm -rf "$HOME/.zshrc" "$HOME/.zsh" "$HOME/.antigen" "$HOME/.config/antigen.zsh" "$HOME/.oh-my-zsh"
# Install oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
# Download antigen
curl -L git.io/antigen >"$HOME/.config/antigen.zsh"
ln -sf "$PWD/.zshrc" "$HOME/.zshrc"
# install starship theme
curl -sS https://starship.rs/install.sh | sh
ln -sf "$PWD/.gitconfig" "$HOME/.gitconfig"
# ---------------------------------------- zsh ---------------------------------------- #
# ---------------------------------------- tmux ---------------------------------------- #
echo "=============================== Configure tmux ==============================="
rm -rf "$HOME/.tmux.conf" "$HOME/.tmux/"
ln -sf "$PWD/.tmux.conf" "$HOME/.tmux.conf"
# Install tpm:
git clone https://github.com/tmux-plugins/tpm "$HOME/.tmux/plugins/tpm"
# ---------------------------------------- tmux ---------------------------------------- #
# ---------------------------------------- vim --------------------------------------- #
echo "=============================== Configure nvim ==============================="
make clean-vim
nvim --headless "+Lazy! sync" +qa
# ---------------------------------------- vim ---------------------------------------- #