-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·76 lines (62 loc) · 2.46 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·76 lines (62 loc) · 2.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
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
#!/usr/bin/env bash
set -euo pipefail
DOTFILES_DIR="$(cd "$(dirname "$0")" && pwd)"
CONFIGS_DIR="$DOTFILES_DIR/configs"
echo "=== Laptop Setup ==="
# ------------------------------------------------------------------
# 1. 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)"
eval "$(/opt/homebrew/bin/brew shellenv)"
else
echo "Homebrew already installed"
fi
# ------------------------------------------------------------------
# 2. Brew packages
# ------------------------------------------------------------------
echo "Installing brew casks..."
for cask in google-chrome visual-studio-code ghostty miniconda claude nikitabobko/tap/aerospace; do
brew install --cask "$cask" 2>/dev/null || echo "$cask already installed"
done
echo "Installing brew formulae..."
for formula in tmux git uv; do
brew install "$formula" 2>/dev/null || echo "$formula already installed"
done
# ------------------------------------------------------------------
# 3. Conda init
# ------------------------------------------------------------------
echo "Initializing conda..."
CONDA_BIN="/opt/homebrew/Caskroom/miniconda/base/bin/conda"
if [ -f "$CONDA_BIN" ]; then
"$CONDA_BIN" init zsh
"$CONDA_BIN" config --set changeps1 False
fi
# ------------------------------------------------------------------
# 4. Config files
# ------------------------------------------------------------------
echo "Linking config files..."
# Ghostty
mkdir -p "$HOME/.config/ghostty"
cp "$CONFIGS_DIR/ghostty.conf" "$HOME/.config/ghostty/config"
# AeroSpace
cp "$CONFIGS_DIR/aerospace.toml" "$HOME/.aerospace.toml"
# tmux
cp "$CONFIGS_DIR/tmux.conf" "$HOME/.tmux.conf"
# zshrc
cp "$CONFIGS_DIR/zshrc" "$HOME/.zshrc"
# VS Code
VSCODE_DIR="$HOME/Library/Application Support/Code/User"
mkdir -p "$VSCODE_DIR"
cp "$CONFIGS_DIR/vscode-settings.json" "$VSCODE_DIR/settings.json"
# ------------------------------------------------------------------
# 5. VS Code extensions
# ------------------------------------------------------------------
echo "Installing VS Code extensions..."
while IFS= read -r ext; do
[ -z "$ext" ] && continue
code --install-extension "$ext" --force 2>/dev/null || echo "Failed: $ext"
done < "$CONFIGS_DIR/vscode-extensions.txt"
echo ""
echo "=== Done! Restart your terminal or run: source ~/.zshrc ==="