-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlink.sh
More file actions
executable file
·46 lines (39 loc) · 1.51 KB
/
Copy pathlink.sh
File metadata and controls
executable file
·46 lines (39 loc) · 1.51 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
#!/usr/bin/env bash
# Set vscode config directory according to linux or mac
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
export VSCODE_CONFIG_DIR="$HOME/.config/Code/User"
elif [[ "$OSTYPE" == "darwin"* ]]; then
export VSCODE_CONFIG_DIR="$HOME/Library/Application Support/Code/User"
fi
rm -rf ~/.vimrc
rm -rf ~/.config/ghostty/config
rm -rf ~/.p10k.zsh
rm -rf "$VSCODE_CONFIG_DIR/settings.json"
rm -rf "$VSCODE_CONFIG_DIR/keybindings.json"
rm -rf ~/.tmux.conf ~/.useful_functions.sh
rm -rf ~/.emacs.d
ln -s "$(pwd)/vim/vimrc" ~/.vimrc
ln -s "$(pwd)/tmux/tmux.conf" ~/.tmux.conf
ln -s "$(pwd)/scripts/useful_functions.sh" ~/.useful_functions.sh
ln -s "$(pwd)/emacs.d" ~/.emacs.d
# link vscode settings
ln -s "$(pwd)/vscode/settings.json" "$VSCODE_CONFIG_DIR/settings.json"
ln -s "$(pwd)/vscode/keybindings.json" "$VSCODE_CONFIG_DIR/keybindings.json"
# ghostty
mkdir -p ~/.config/ghostty
ln -s "$(pwd)/ghostty/config" ~/.config/ghostty/config
ln -s "$(pwd)/zsh/.p10k.zsh" ~/.p10k.zsh
# ask to copy ssh/config to .ssh/config
read -p "Do you want to remove your ~/.ssh/config and copy template ssh/config? (y/n): "
if [[ $REPLY =~ ^[Yy](es)?$ ]]; then
rm -f ~/.ssh/config
cp ssh/config ~/.ssh/config
fi
# ask to copy git/gitconfig to .gitconfig
read -p "Do you want to remove your ~/.gitconfig and copy template git/gitconfig? (y/n): "
if [[ $REPLY =~ ^[Yy](es)?$ ]]; then
rm -f ~/.gitconfig
cp git/gitconfig ~/.gitconfig
fi
echo "All done!"
echo "Please make sure you've installed the install script from "scripts/install.sh""