-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·64 lines (50 loc) · 1.63 KB
/
install.sh
File metadata and controls
executable file
·64 lines (50 loc) · 1.63 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
#!/bin/sh
set -e
echo "Setting up your Mac..."
# Define the dotfiles directory path
DOTFILES="$HOME/projects/.dotfiles"
# Check for Homebrew and install if we don't have it
if ! command -v brew >/dev/null 2>&1; then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Update Homebrew recipes
brew update
# Install all our dependencies with bundle (See Brewfile)
brew tap homebrew/bundle
brew bundle
# Git
rm -f "$HOME/.gitconfig"
ln -s "$DOTFILES/.config" "$HOME/.gitconfig"
# Zsh
rm -f "$HOME/.zshrc"
ln -s "$DOTFILES/.zshrc" "$HOME/.zshrc"
# Neovim
rm -rf "$HOME/.config/nvim"
mkdir -p "$HOME/.config"
ln -s "$DOTFILES/nvim" "$HOME/.config/nvim"
# Ghostty
rm -f "$HOME/.config/ghostty/config"
mkdir -p "$HOME/.config/ghostty"
ln -s "$DOTFILES/ghostty-config" "$HOME/.config/ghostty/config"
# Tmux
rm -f "$HOME/.tmux.conf"
ln -s "$DOTFILES/.tmux.conf" "$HOME/.tmux.conf"
# Install tmux plugin manager (tpm) if not already installed
if [ ! -d "$HOME/.tmux/plugins/tpm" ]; then
git clone https://github.com/tmux-plugins/tpm "$HOME/.tmux/plugins/tpm"
fi
# Reload tmux configuration to apply changes
tmux source-file "$HOME/.tmux.conf" || echo "tmux not running, skipping reload"
# Starship
rm -f "$HOME/.config/starship.toml"
mkdir -p "$HOME/.config"
ln -s "$DOTFILES/starship.toml" "$HOME/.config/starship.toml"
# R
rm -f "$HOME/.Rprofile"
ln -s "$DOTFILES/.Rprofile" "$HOME/.Rprofile"
# Aerospace
mkdir -p "$HOME/.config/aerospace"
rm -f "$HOME/.config/aerospace/aerospace.toml"
ln -s "$DOTFILES/aerospace.toml" "$HOME/.config/aerospace/aerospace.toml"
# Set macOS preferences
source "$DOTFILES/.macos"