-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-darwin
executable file
·224 lines (202 loc) · 5.35 KB
/
install-darwin
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
#!/usr/bin/env bash
set -euo pipefail
export HOMEBREW_NO_ENV_HINTS=1
# add git via xcode cli tools
if ! command -v git &>/dev/null; then
xcode-select --install
fi
# setup rosetta
if [[ "$(uname -m)" != "arm64" ]] ; then
echo "not arm64"
else
if ! (arch -arch x86_64 uname -m > /dev/null) ; then
echo "arm64: no Rosetta installed"
softwareupdate --install-rosetta --agree-to-license
fi
fi
# enable homebrew in path in case we just installed it.
export PATH=/opt/homebrew/bin:$PATH
# install homebrew
if [ ! "$(command -v brew)" ]; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
# update homebrew packages
brew update --quiet
brew upgrade --quiet
brew install --quiet --formula \
aichat \
asdf \
bash-language-server \
bat-extras \
broot \
btop \
bzip2 \
caddy \
chruby \
clojure \
clojure-lsp \
cmake \
colima \
devcontainer \
direnv \
dust \
eza \
fd \
fx \
gh \
git-extras \
git-machete \
glow \
gnuplot \
golang \
gource \
gradle \
grpcurl \
gum \
helm \
hexyl \
htop \
httpie \
hwatch \
kompose \
lazydocker \
lazygit \
less \
lsd \
lua \
lua-language-server \
luajit-openresty \
luarocks \
lxc \
mingw-w64 \
mtr \
mutagen-io/mutagen/mutagen \
neovim \
nmap \
nvr \
ollama \
opam \
pam-reattach \
pandoc \
pipx \
protobuf \
pstree \
pyenv \
ripgrep \
ruby-install \
ruff \
sccache \
shellcheck \
tailspin \
temporal \
tig \
tokei \
tmux \
tree \
typescript-language-server \
viddy \
watch \
web-ext \
wget \
xz \
zig \
zlib \
zsh-autosuggestions \
zoxide \
;
brew install --quiet --cask \
1password \
1password-cli \
caffeine \
chatbox \
cleanshot \
discord \
discord \
firefox \
font-fira-code-nerd-font \
font-fantasque-sans-mono \
font-fantasque-sans-mono-nerd-font \
font-hack-nerd-font \
google-chrome \
imhex \
istat-menus \
kitty \
logi-options-plus \
mitmproxy \
ngrok \
obs \
obsidian \
racket \
raycast \
signal \
slack \
sublime-text \
tailscale \
utm \
yubico-yubikey-manager \
zed \
zoom \
;
brew install --quiet --cask --no-quarantine \
alacritty \
;
brew autoremove --quiet;
brew remove -f openssh; # doesn't play well with macos
brew remove -f microsoft-remote-desktop; # deprecate
brew remove -f dog; # no longer maintained
ruby-install --no-reinstall ruby 3.1.3
# install aws cli v2
if ! aws --version; then
cd $(mktemp -d)
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /
cd ~
fi
# enable go in path in case we just installed it.
export PATH=/usr/local/go/bin:$PATH
# we use homebrew go from now on
sudo rm -rf /usr/local/go
# neovim
#
# we're using homebrew neovim now. remove the links to previous places we were
# installing neovim and its aliases
sudo rm -rf /usr/local/bin/vim
sudo rm -rf /usr/local/bin/vi
sudo rm -rf /usr/local/bin/nvim
~/.dotfiles/install-common
# set darwin defaults
# https://macos-defaults.com/
#
defaults write -g ApplePressAndHoldEnabled -bool false
defaults write -g KeyRepeat -int 2
defaults write -g NSWindowResizeTime -float 0.001
defaults write -g NSWindowShouldDragOnGesture -bool true
defaults write NSGlobalDomain AppleSpacesSwitchOnActivate -bool true # switch to space with open app
defaults write NSGlobalDomain com.apple.keyboard.fnState -bool true # use fn keys as F1, F2, etc.
defaults write com.apple.ActivityMonitor IconType -int 6
defaults write com.apple.ActivityMonitor UpdatePeriod -int 1
defaults write com.apple.Dock autohide-delay -float 0
defaults write com.apple.TextEdit RichText -bool false
defaults write com.apple.TextEdit SmartQuotes -bool false
defaults write com.apple.WindowManager EnableStandardClickToShowDesktop -bool false
defaults write com.apple.accessibility ReduceMotionEnabled -int 1
defaults write com.apple.dock appswitcher-all-displays -bool true # show cmd tab on all displays
defaults write com.apple.dock autohide -bool true
defaults write com.apple.dock autohide-time-modifier -float 0.75
defaults write com.apple.dock expose-animation-duration -float 0.1
defaults write com.apple.dock mineffect -string scale
defaults write com.apple.dock mru-spaces -bool false # do not rearrange spaces
defaults write com.apple.dock show-recents -bool false
defaults write com.apple.dock springboard-hide-duration -float 0
defaults write com.apple.dock springboard-page-duration -float 0
defaults write com.apple.dock springboard-show-duration -float 0
defaults write com.apple.dock tilesize -int 36
defaults write com.apple.finder DisableAllAnimations -bool false
defaults write com.apple.mail DisableReplyAnimations -bool false
defaults write com.apple.spaces spans-displays -bool false # spaces shared across monitors
killall Dock
killall SystemUIServer
# finally, install the launchd daemons
if [ "$DOTFILES_INSTALL_LAUNCHD" == "1" ]; then
~/.dotfiles/install-launchd
fi