-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
56 lines (42 loc) · 2.43 KB
/
setup.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
55
56
#!/bin/bash
[[ -n $(lsof -nP -i :7890 -i :1080) ]] && echo 'proxy ok' || {
echo 'proxy fail' && exit
}
[[ -n $(lsof -nP -i :7890) ]] && {
export https_proxy=http://127.0.0.1:7890
export http_proxy=http://127.0.0.1:7890
export all_proxy=socks5://127.0.0.1:7890
}
[[ -n $(lsof -nP -i :1087) ]] && {
export http_proxy=http://127.0.0.1:1087
export https_proxy=http://127.0.0.1:1087
export ALL_PROXY=socks5://127.0.0.1:1080
}
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
curl -sSL https://raw.githubusercontent.com/boomker/dotfiles/refs/heads/main/Brewfile
[[ -e ./Brewfile ]] && brew bundle --file=./Brewfile
mkidr -p "${HOME}/.zprezto/contrib/user_plugins" "${HOME}/.tmux/plugins"
export PREZCUSMODIR="${HOME}/.zprezto/contrib"
git clone https://github.com/tmux-plugins/tpm "${HOME}/.tmux/plugins/tpm"
git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
git clone [email protected]:Aloxaf/fzf-tab.git "${PREZCUSMODIR:-$HOME/.zprezto/contrib}/fzf-tab"
git clone [email protected]:romkatv/zsh-defer.git "${PREZCUSMODIR:-$HOME/.zprezto/contrib}/zsh-defer"
git clone [email protected]:Skylor-Tang/auto-venv.git "${PREZCUSMODIR:-$HOME/.zprezto/contrib}/auto-venv"
git clone [email protected]:hlissner/zsh-autopair.git "${PREZCUSMODIR:-$HOME/.zprezto/contrib}/zsh-autopair"
git clone [email protected]:boomker/uvcode.git "${HOME}/gitrepos/uvcode"
git clone [email protected]:boomker/dotfiles.git "${HOME}/gitrepos/dotfiles"
git clone [email protected]:boomker/spacehammer.git "${HOME}/gitrepos/spacehammer"
if [[ -d "${HOME}/gitrepos/dotfiles" ]]; then
ln -fsv "${HOME}/gitrepos/dotfiles/zsh/.*" "${HOME}/"
ln -fsv "${HOME}/gitrepos/dotfiles/.ssh/config" "${HOME}/"
ln -fsv "${HOME}/gitrepos/dotfiles/git/.gitconfig" "${HOME}/"
ln -fsv "${HOME}/gitrepos/dotfiles/.config/*" "${HOME}/.config/"
ln -fsv "${HOME}/gitrepos/dotfiles/tmux/.tmux.conf" "${HOME}/"
ln -fsv "${HOME}/gitrepos/dotfiles/tmux/fzf-tmux-pane" "${HOME}/.tmux/plugins/"
ln -fsv "${HOME}/gitrepos/dotfiles/zsh/*.zsh" "${PREZCUSMODIR:-$HOME/.zprezto/contrib}/user_plugins/"
fi
[[ -d "${HOME}/gitrepos/spacehammer" ]] && ln -sv "${HOME}/gitrepos/spacehammer" "${HOME}/.config/"
[[ -d "${HOME}/gitrepos/uvcode" ]] && ln -sv "${HOME}/gitrepos/uvcode" "${HOME}/.config/"
[[ -e $(which neovim) ]] && ln -sv /usr/local/opt/nvim/share/nvim "${HOME}/.nvim"
[[ -e $(which yazi) ]] && ya pack -i && ya pack -u
ssh-keygen -t ed25519 -q -P ''