-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathsetup
More file actions
executable file
路89 lines (76 loc) 路 2.4 KB
/
Copy pathsetup
File metadata and controls
executable file
路89 lines (76 loc) 路 2.4 KB
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
#!/bin/bash
set -euo pipefail
link() {
mkdir -p "$(dirname "$2")"
if [ -e "$2" ]; then
echo "Skipping $2, already exists."
else
ln -sf "$1" "$2"
echo "Linked $1 to $2"
fi
}
# bins
link "$PWD"/bin ~/.bin
if which tmux; then
link "$PWD"/tmux ~/.config/tmux
echo "Installing tmux plugin manager (TPM)..."
if [ ! -d ~/.config/tmux/plugins ]; then
mkdir -p ~/.config/tmux/plugins
git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm >/dev/null
fi
tmux source ~/.config/tmux/tmux.conf
"$HOME"/.config/tmux/plugins/tpm/bin/install_plugins
fi
#
# shell
link "$PWD"/fish/functions ~/.config/fish/functions
link "$PWD"/fish/themes ~/.config/fish/themes
link "$PWD"/fish/config.fish ~/.config/fish/config.fish
# terms
link "$PWD"/ghostty ~/.config/ghostty
# neovim
if which nvim; then
link "$PWD"/nvim ~/.config/nvim
nvim --headless "+Lazy! sync" +qa &>/dev/null
fi
# other apps
link "$PWD"/git ~/.config/git
link "$PWD"/gh/config.yml ~/.config/gh/config.yml
link "$PWD"/gh-dash ~/.config/gh-dash
link "$PWD"/fd/ignore ~/.config/fd/ignore
link "$PWD"/direnv ~/.config/direnv
link "$PWD"/aerospace ~/.config/aerospace
link "$PWD"/atuin/config.toml ~/.config/atuin/config.toml
link "$PWD"/btop ~/.config/btop
link "$PWD"/lazygit ~/.config/lazygit
link "$PWD"/process-compose ~/.config/process-compose
link "$PWD"/raycast/scripts ~/.config/raycast/scripts
link "$PWD"/sesh ~/.config/sesh
link "$PWD"/starship/starship.toml ~/.config/starship.toml
link "$PWD"/yazi ~/.config/yazi
link "$PWD"/bat ~/.config/bat
link "$PWD"/diffnav ~/.config/diffnav
link "$PWD"/resterm ~/.config/resterm
link "$PWD"/nvpm/nvpm-lock.json ~/.config/nvpm/nvpm-lock.json
link "$PWD"/nvpm/discovery.json ~/.config/nvpm/discovery.json
if [[ $OSTYPE == 'darwin'* ]]; then
brew bundle
fi
if ! which vtsls; then
npm install -g @vtsls/language-server
fi
# Fish setup
if ! grep -q fish /etc/shells; then
echo "Adding $(which fish) to /etc/shells - will ask sudo password"
command -v fish | sudo tee -a /etc/shells
fi
if ! finger "$USER" | grep -q 'Shell: .*fish'; then
echo "Setting $(which fish) as the default shell - will ask user password"
chsh -s "$(command -v fish)"
fi
"$PWD"/scripts/setup.fish
echo "Making C-w (delete word backward) etc. work globally in macOS"
cp DefaultKeyBinding.dict ~/Library/KeyBindings/DefaultKeyBinding.dict
CODE="$HOME/code"
mkdir -p "$CODE/personal"
mkdir -p "$CODE/playground"