-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·73 lines (61 loc) · 2.03 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
# variables
DotfilesPath="$HOME/code/dotfiles"
ConfigPath="$HOME/.config"
if [[ -d "$DotfilesPath" ]]; then
: # noop
else
echo "ERROR: $DotfilesPath does not exist. Make sure you've cloned dotfiles correctly: https://github.com/yevhenorlov/dotfiles#installation"
exit
fi
if [[ -d "$ConfigPath" ]]; then
: # noop
else
echo "Config path $ConfigPath does not exist. Creating..."
mkdir "$ConfigPath"
fi
# check if nvim directory exists
if [[ -d "$ConfigPath/nvim" ]]; then
: # noop
else
echo "Creating nvim directory..."
mkdir -p "$ConfigPath/nvim"
fi
# check if kitty directory exists
if [[ -d "$ConfigPath/kitty" ]]; then
: # noop
else
echo "Creating kitty directory..."
mkdir -p "$ConfigPath/kitty"
fi
# zsh
ln -sfn "$DotfilesPath/zsh/.zshrc" "$HOME/.zshrc"
ln -sfn "$DotfilesPath/zsh/.zshrc_modules" "$HOME/.zshrc_modules"
if [[ ! -d "$ZSH_CUSTOM" ]]; then
echo "\$ZSH_CUSTOM not found, add symlink manually"
else
ln -sfn "$DotfilesPath/zsh/themes/lambda_minimal.zsh-theme" "$ZSH_CUSTOM/themes/lambda_minimal.zsh-theme"
fi
# cli scripts
ln -sfn "$DotfilesPath/chatgpt.sh" "$HOME/chatgpt.sh"
# git
ln -sfn "$DotfilesPath/.gitconfig" "$HOME/.gitconfig"
ln -sfn "$DotfilesPath/.gitignore_global" "$HOME/.gitignore_global"
# neovim
ln -sfn "$DotfilesPath/nvim/colors/" "$ConfigPath/nvim/colors"
ln -sfn "$DotfilesPath/nvim/lua/" "$ConfigPath/nvim/lua"
ln -sfn "$DotfilesPath/nvim/init.lua" "$ConfigPath/nvim/init.lua"
# tmux
ln -sfn "$DotfilesPath/.tmux.conf" "$HOME/.tmux.conf"
ln -sfn "$DotfilesPath/tmux-sessionizer" "/usr/local/bin/tmux-sessionizer"
ln -sfn "$DotfilesPath/tmux-cht.sh" "/usr/local/bin/tmux-cht.sh"
# kitty
ln -sfn "$DotfilesPath/kitty/kitty.conf" "$ConfigPath/kitty/kitty.conf"
# karabiner
ln -sfn "$DotfilesPath/karabiner/karabiner.json" "$ConfigPath/karabiner/karabiner.json"
# npm dependencies that were not handled by mason.nvim etc.
# to update the list, check
# npm list -g --depth 0
npm install -g prettier tldr typescript @vue/language-server
# for faster search from Telescope.nvim
brew install ripgrep