-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·73 lines (52 loc) · 3.42 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·73 lines (52 loc) · 3.42 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
#!/usr/bin/env bash
#
# One-command new-machine bootstrap.
# Installs all tools and symlinks dotfiles — everything you need to get started.
#
# Usage:
# cd ~/dotfiles && bash install.sh
set -euo pipefail
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$DIR"
# ─── Oh My Zsh ────────────────────────────────────────────────────────────────
echo "→ Installing Oh My Zsh..."
if [ ! -d "$HOME/.oh-my-zsh" ]; then
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
fi
# ─── Homebrew packages ────────────────────────────────────────────────────────
echo "→ Installing brew packages..."
brew install \
zsh tmux neovim git bat fd ripgrep fzf thefuck htop btop \
neofetch starship zellij yazi television atuin zoxide
echo "→ Installing casks and fonts..."
brew install --cask wezterm ghostty font-jetbrains-mono-nerd-font
# ─── opencode ─────────────────────────────────────────────────────────────────
echo "→ Installing opencode..."
curl -fsSL https://opencode.ai/install.sh | sh
# ─── Zsh plugins ──────────────────────────────────────────────────────────────
echo "→ Setting up zsh plugins..."
ZSH_CUSTOM="$HOME/.oh-my-zsh/custom"
clone_or_pull() {
local repo="$1" dir="$2"
if [ -d "$dir" ]; then
git -C "$dir" pull --ff-only
else
git clone --depth=1 "$repo" "$dir"
fi
}
clone_or_pull https://github.com/romkatv/powerlevel10k.git "$ZSH_CUSTOM/themes/powerlevel10k"
clone_or_pull https://github.com/zsh-users/zsh-autosuggestions "$ZSH_CUSTOM/plugins/zsh-autosuggestions"
clone_or_pull https://github.com/zsh-users/zsh-syntax-highlighting "$ZSH_CUSTOM/plugins/zsh-syntax-highlighting"
clone_or_pull https://github.com/zdharma-continuum/fast-syntax-highlighting "$ZSH_CUSTOM/plugins/fast-syntax-highlighting"
# ─── Tmux plugin manager ──────────────────────────────────────────────────────
echo "→ Setting up tmux plugin manager..."
clone_or_pull https://github.com/tmux-plugins/tpm "$HOME/.tmux/plugins/tpm"
# ─── gh-dash ──────────────────────────────────────────────────────────────────
echo "→ Installing gh-dash..."
gh extension install dlvhdr/gh-dash 2>/dev/null || gh extension upgrade gh-dash
# ─── Symlink dotfiles via setup.sh ─────────────────────────────────────────────
echo "→ Running setup.sh to symlink dotfiles..."
bash setup.sh
# ─── Done ─────────────────────────────────────────────────────────────────────
echo ""
echo "✓ New machine ready!"