-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·59 lines (49 loc) · 1.8 KB
/
setup.sh
File metadata and controls
executable file
·59 lines (49 loc) · 1.8 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
#!/usr/bin/env bash
set -euo pipefail
DOTFILES_DIR="$(cd "$(dirname "$0")" && pwd)"
echo "==> macOS dotfiles setup"
# --- Homebrew ---
if ! command -v brew &>/dev/null; then
echo "==> Installing Homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Add brew to PATH for Apple Silicon Macs
if [ -f /opt/homebrew/bin/brew ]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
else
echo "==> Homebrew already installed"
fi
# --- Dependencies ---
echo "==> Installing packages from Brewfile..."
brew bundle --file="$DOTFILES_DIR/Brewfile"
# --- Services ---
echo "==> Starting services..."
brew services start borders 2>/dev/null || true
brew services start sketchybar 2>/dev/null || true
# --- Symlink configs ---
echo "==> Linking config files..."
"$DOTFILES_DIR/scripts/link.sh"
# --- iTerm2 color presets ---
echo "==> Importing iTerm2 color presets..."
for itermcolors in "$DOTFILES_DIR"/themes/*/*.itermcolors; do
[ -f "$itermcolors" ] || continue
preset="$(basename "$itermcolors" .itermcolors)"
if /usr/libexec/PlistBuddy -c "Print ':Custom Color Presets:$preset'" ~/Library/Preferences/com.googlecode.iterm2.plist &>/dev/null; then
echo " $preset: already imported"
else
open "$itermcolors"
echo " $preset: imported"
fi
done
# --- Spicetify ---
if command -v spicetify &>/dev/null; then
echo "==> Setting up Spicetify..."
spicetify backup apply 2>/dev/null || true
spicetify config custom_apps marketplace 2>/dev/null || true
spicetify apply 2>/dev/null || true
echo " Open Spotify and pick a theme from the Marketplace."
fi
echo ""
echo "==> Setup complete!"
echo " Run ./scripts/switch-theme.sh to pick a color theme."
echo " Sign into Raycast to sync your settings."