forked from zaksoup/zotfiles
-
Notifications
You must be signed in to change notification settings - Fork 5
/
install
executable file
·77 lines (63 loc) · 1.69 KB
/
install
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
#!/bin/zsh
setup() {
ZOTFILES="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
brew update
}
install_prefs() {
# Link and read iterm2 prefs
ln -s "$ZOTFILES/com.googlecode.iterm2.plist" "$HOME/Library/Preferences/com.googlecode.iterm2.plist"
defaults read "$HOME/Library/Preferences/com.googlecode.iterm2.plist"
# Link and read Spectacle prefs
ln -s "$ZOTFILES/com.divisiblebyzero.Spectacle.plist" "$HOME/Library/Preferences/com.divisiblebyzero.Spectacle.plist"
defaults read "$HOME/Library/Preferences/com.divisiblebyzero.Spectacle.plist"
}
install_omz() {
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
chsh -s /bin/zsh
}
install_powerline() {
echo "Installing powerline fonts\n"
pushd "$HOME/workspace"
git clone https://github.com/powerline/fonts.git powerline-fonts
pushd powerline-fonts
./install.sh
popd
popd
}
install_luan_vim() {
echo "Installing luan's vimfiles\n"
pushd "$HOME"
git clone https://github.com/luan/vimfiles.git .vim
pushd .vim
./install
popd
popd
}
link_dotfiles() {
ln -s "$ZOTFILES/.vimrc.local $HOME/.vimrc.local"
ln -s "$ZOTFILES/.zshrc" "$HOME/.zshrc"
ln -s "$ZOTFILES/zagnoster.zsh-theme" "$HOME/.oh-my-zsh/themes/zagnoster.zsh-theme"
cp "$ZOTFILES/.gitconfig" "$HOME/.gitconfig"
}
install_neovim() {
ln -s /usr/local/bin/nvim /usr/local/bin/vim
source ~/.zshrc
pip3 install neovim
}
set_defaults() {
defaults write NSGlobalDomain KeyRepeat 1
defaults write NSGlobalDomain InitialKeyRepeat 15
}
main() {
setup
brew bundle
brew link git --force
install_prefs
install_powerline
install_neovim
install_omz
link_dotfiles
install_luan_vim
set_defaults
}
main $@