-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup
More file actions
executable file
·160 lines (124 loc) · 4.08 KB
/
setup
File metadata and controls
executable file
·160 lines (124 loc) · 4.08 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
#!/bin/bash
set -e
# Colors for output
GREEN='\033[0;32m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
log() {
echo -e "${BLUE}==>${NC} $1"
}
success() {
echo -e "${GREEN}✓${NC} $1"
}
# Set XDG_CONFIG_HOME if not already set
if [ -z "$XDG_CONFIG_HOME" ]; then
export XDG_CONFIG_HOME="$HOME/.config"
log "XDG_CONFIG_HOME not set, using default: $XDG_CONFIG_HOME"
fi
# Check brew is installed
if ! command -v brew &>/dev/null; then
echo "Homebrew not found, please install it first from https://brew.sh/"
exit 1
fi
# Check gh cli is installed
if ! command -v gh &>/dev/null; then
log "Installing GitHub CLI..."
brew install gh
fi
# Check stow is installed
if ! command -v stow &>/dev/null; then
log "Installing stow..."
brew install stow
fi
# Work specific settings
if [ ! -f "$PWD/shell/.config/shell/work" ]; then
log "Creating work config from example..."
cp "$PWD/shell/.config/shell/work.example" "$PWD/shell/.config/shell/work"
fi
# Install dependencies first
log "Installing external dependencies..."
# Oh My Zsh (must be installed before stowing shell configs)
if [ ! -d "$HOME/.oh-my-zsh" ]; then
log "Installing Oh My Zsh..."
sh -c "$(wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
fi
# Tmux Package Manager
if [ ! -d "$HOME/.tmux/plugins/tpm" ]; then
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
success "TPM installed"
fi
# Alacritty themes
if [ ! -d "$XDG_CONFIG_HOME/alacritty/themes" ]; then
git clone https://github.com/alacritty/alacritty-theme "$XDG_CONFIG_HOME/alacritty/themes"
success "Alacritty themes installed"
fi
# Tmux Theme
if [ ! -d "$HOME/.config/tmux/plugins/catppuccin/tmux" ]; then
mkdir -p ~/.config/tmux/plugins/catppuccin
git clone -b v2.1.3 https://github.com/catppuccin/tmux.git ~/.config/tmux/plugins/catppuccin/tmux
success "Catppuccin tmux theme installed"
fi
# Stow packages
log "Stowing configurations..."
# Stow all packages
stow --restow --target="$HOME" shell
success "Shell configs stowed"
stow --restow --target="$HOME" tmux
success "Tmux configs stowed"
stow --restow --target="$HOME" nvim
success "Neovim configs stowed"
stow --restow --target="$HOME" terminal
success "Terminal configs stowed"
stow --restow --target="$HOME" git-tools
success "Git tools configs stowed"
# Zsh autosuggestions
if [ ! -d "${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions" ]; then
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
success "Zsh autosuggestions installed"
fi
# Install packages
log "Installing packages with Homebrew..."
brew install rg fd gnu-sed wget fzf zoxide
success "General utility packages installed"
# brew install --cask alacritty
brew install --cask ghostty
success "Ghostty installed"
brew install nvim
success "Neovim installed"
brew install tmux
success "Tmux installed"
brew install sesh
success "Sesh installed"
brew install font-hack-nerd-font
success "Hack Nerd Font installed"
brew install --cask raycast
success "Raycast installed"
brew install go
success "Go installed"
brew install jesseduffield/lazygit/lazygit
go install github.com/arl/gitmux@latest
gh extension install dlvhdr/gh-dash
success "Git tools installed"
brew install fnm pnpm
success "Node packages installed"
# Build and install custom alx CLI
if [ -d "$PWD/alx" ]; then
log "Building alx CLI..."
cd alx && go build && cd ..
if [ ! -d "$HOME/.local/bin" ]; then
mkdir -p "$HOME/.local/bin"
fi
ln -sf "$PWD/alx/alx" "$HOME/.local/bin/alx"
success "alx CLI built and installed"
fi
echo ""
echo -e "${GREEN}Setup complete!${NC}"
# === Linux specific packages
# sudo apt install build-essential ripgrep tmux fd-find -y
# Ruby
# gpg --keyserver keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
# sudo apt-add-repository -y ppa:rael-gc/rvm
# sudo apt-get update
# sudo apt-get install rvm -y
# sudo usermod -a -G rvm $USER
# echo -e '\nsource "/etc/profile.d/rvm.sh"' >> ~/.bashrc