-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·56 lines (47 loc) · 1.14 KB
/
install.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
UPATH=$HOME/.myutils
# Yabai
function yabai_conf() {
ln -s $UPATH/config/yabai/yabairc ~/.yabairc
}
# Skhd
function skhd_conf() {
ln -s $UPATH/config/skhd/skhdrc ~/.skhdrc
}
# Neovim
function nvim_conf() {
mkdir -p ~/.config/nvim
ln -s $UPATH/config/nvim/init.vim ~/.config/nvim/init.vim
# I also want it to be shared with fallback vim
ln -s $UPATH/config/nvim/init.vim ~/.vimrc
# Install vim-plugged, need to run `nvim +PlugInstall` manually
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'
}
# Tmux
function tmux_conf() {
ln -s $UPATH/config/tmux/tmux.conf ~/.tmux.conf
}
function zsh_conf() {
ln -s $UPATH/config/zsh/zshrc ~/.zshrc
}
function kitty_conf() {
ln -s $UPATH/config/kitty/kitty.conf ~/.config/kitty/kitty.conf
}
# Install
function main() {
if [ "$(uname)" == "Darwin" ]; then
yabai_conf
skhd_conf
kitty_conf
fi
nvim_conf
tmux_conf
zsh_conf
}
if [ "$1" == "nvim" ]; then
nvim_conf
else
# Gimme all
main
fi