-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.sh
105 lines (89 loc) · 2.88 KB
/
bootstrap.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#!/usr/bin/env bash
echo "Bootstrapping new system config..."
# TODO: Add brew installs
# - fzf
# - bat
# - lazygit
# - tmux
# - wezterm
# - fd
echo ""
echo "Installing Nerd Fonts"
brew tap homebrew/cask-fonts
brew install font-go-mono-nerd-font
echo ""
echo "---------------"
echo "Configuring zsh"
echo "---------------"
if ! command -v zsh > /dev/null 2>&1
then
echo >&2 "zsh could not be found, skipping configuration"
else
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
brew install starship
mv $HOME/.zprofile $HOME/.zprofile.post-oh-my-zsh
ln -s $HOME/.config/zsh/profile $HOME/.zprofile
mv $HOME/.zshrc $HOME/.zshrc.post-oh-my-zsh
ln -s $HOME/.config/zsh/rc $HOME/.zshrc
fi
echo ""
echo "----------------"
echo "Configuring tmux"
echo "----------------"
if ! command -v tmux > /dev/null 2>&1
then
echo >&2 "tmux could not be found, install with 'brew install tmux'"
else
echo "Linking tmux configs"
ln -s $HOME/.config/tmux/tmux.conf $HOME/.tmux.conf
ln -s $HOME/.config/tmux/tmux.theme $HOME/.tmux.theme
fi
# echo ""
# echo "-------------------"
# echo "Configuring espanso"
# echo "-------------------"
# if ! command -v espanso > /dev/null 2>&1
# then
# echo >&2 "espanso could not be found, install with 'brew install espanso'"
# else
# echo "Linking espanso configs"
# ln -s $HOME/.config/espanso "/Users/jmaxwell/Library/Application Support/espanso/"
# fi
echo ""
echo "------------------"
echo "Configuring neovim"
echo "------------------"
if ! command -v nvim > /dev/null 2>&1
then
echo >&2 "nvim could not be found, install with 'brew install neovim'"
else
echo "Installing Neovim Plugins"
git clone --depth 1 https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim
#echo "Downloading nvim plugin manager plug.vim"
#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'
#echo "Installing nvim plugins"
#nvim +PlugInstall +qall
fi
# echo ""
# echo "---------------"
# echo "Configuring ssh"
# echo "---------------"
# if ! command -v ssh > /dev/null 2>&1
# then
# echo >&2 "ssh could not be found... uh... better fix that"
# else
# ln -s $HOME/.config/ssh/config $HOME/.ssh/config
# fi
echo ""
echo "---------------"
echo "Configuring git"
echo "---------------"
if ! command -v zsh > /dev/null 2>&1
then
echo >&2 "git could not be found, install with 'brew install git' or more likely xcode command line tools"
else
git config --global alias.all '!f() { find . -name .git -type d -prune -exec dirname {} \; | xargs -I{} bash -c "echo '\n## Pulling: {}' && git -C {} $1"; }; f'
#ln -s $HOME/.config/git/config $HOME/.gitconfig
fi