-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.zsh
executable file
·79 lines (63 loc) · 2.29 KB
/
install.zsh
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
ZSH=$HOME/.oh-my-zsh
ZSH_CUSTOM_DIR=$ZSH/custom
BASEDIR=$(dirname $0)
# TODO: add function to install neovim (see ~/tmp/util-functions.zsh)
install_brew_binaries() {
for binary in $(cat brew_binaries.txt); do
echo "intalling $binary"
brew install "$binary"
done
}
install_ohmyzsh() {
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
# add useful zsh plugins
if [[ -d $HOME/.oh-my-zsh ]]; then
git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH/custom/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH/custom/plugins/zsh-syntax-highlighting
fi
}
link_dotfiles () {
echo "\nCopying each dotfile to its respective location"
cd $BASEDIR
mkdir -p $HOME/.config/alacritty
mkdir -p $HOME/.config/zellij
ln -sf $PWD/zshrc.zsh $HOME/.zshrc
ln -sf $PWD/zprofile.zsh $HOME/.zprofile
ln -sf $PWD/aliases.zsh $ZSH_CUSTOM_DIR/aliases.zsh
ln -sf $PWD/env.zsh $ZSH_CUSTOM_DIR/env.zsh
ln -sf $PWD/tmux.conf.local $HOME/.tmux.conf.local
ln -sf $PWD/gitconfig $HOME/.gitconfig
ln -sf $PWD/ideavimrc $HOME/.ideavimrc
ln -sf $PWD/config/alacritty $HOME/.config/alacritty
ln -sf $PWD/config/zellij $HOME/.config/zellij
echo "\nNeed to source ~/.zshrc. Run:"
echo "\n \$ source ~/.zshrc"
cd -
}
link_nvim_config () {
cd $BASEDIR
mkdir -p $HOME/.config/nvim
ln -sf $PWD/config/nvim $HOME/.config/nvim
cd -
}
link_warp_config () {
cd $BASEDIR
mkdir -p $HOME/.warp
echo "Linking warp config..."
ln -sf $PWD/warp/* $HOME/.warp/
cd -
}
link_wezterm_config () {
cd $BASEDIR
mkdir -p $HOME/.config/wezterm
ln -sf $PWD/config/wezterm $HOME/.config/wezterm
cd -
}
echo "Run 'install_ohmyzsh' to install oh-my-zsh and the two plugins\n"
echo "Run 'install_brew_binaries' to install the 'brew' binaries defined in ./brew_binaries.txt"
echo "\t contents of 'brew_binaries.txt"
cat brew_binaries.txt
echo "Run 'link_dotfiles' to symlink all dotfiles to the correct spot..."
echo "Run 'link_nvim_config' to symlink the nvim config...\n"
echo "Run 'link_warp_config' to symlink the warp config..."
echo "Run 'link_wezterm_config' to symlink the wezterm config...\n"