-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·49 lines (37 loc) · 1.46 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·49 lines (37 loc) · 1.46 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
#!/bin/bash
# Dotfiles installation script
# Creates symlinks from ~ to dotfiles in this directory
DOTFILES_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo "Installing dotfiles from $DOTFILES_DIR"
# Backup existing files and create symlinks
link_file() {
local src="$1"
local dest="$2"
if [ -e "$dest" ] || [ -L "$dest" ]; then
echo "Backing up existing $dest to ${dest}.backup"
mv "$dest" "${dest}.backup"
fi
echo "Linking $src -> $dest"
ln -sf "$src" "$dest"
}
# Tmux
link_file "$DOTFILES_DIR/.tmux.conf" "$HOME/.tmux.conf"
link_file "$DOTFILES_DIR/.zshrc" "$HOME/.zshrc"
# Neovim & Ghostty
mkdir -p "$HOME/.config"
link_file "$DOTFILES_DIR/.config/nvim" "$HOME/.config/nvim"
link_file "$DOTFILES_DIR/.config/ghostty" "$HOME/.config/ghostty"
# VS Code
mkdir -p "$HOME/Library/Application Support/Code/User"
mkdir -p "$HOME/.vscode/extensions"
link_file "$DOTFILES_DIR/.config/Code/User/settings.json" "$HOME/Library/Application Support/Code/User/settings.json"
rm -rf "$HOME/.vscode/extensions/shubym.pigeon-frost-theme-0.0.1"
cp -R "$DOTFILES_DIR/.config/vscode/themes/pigeon-frost" "$HOME/.vscode/extensions/shubym.pigeon-frost-theme-0.0.1"
# Wallpaper
mkdir -p "$HOME/Pictures"
link_file "$DOTFILES_DIR/.config/wallpapers/back.png" "$HOME/Pictures/back.png"
# Codex pets
mkdir -p "$HOME/.codex/pets"
rm -rf "$HOME/.codex/pets/pigeon"
cp -R "$DOTFILES_DIR/.codex/pets/pigeon" "$HOME/.codex/pets/pigeon"
echo "Done!"