-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-macos.sh
executable file
·42 lines (31 loc) · 1.34 KB
/
install-macos.sh
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
#!/bin/bash
#
# macOS specific first time setup
set -euo pipefail
# Install Homebrew
if ! brew --version; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/tclem/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
# Install everything in the Brewfile
brew bundle
if [[ ! -f ~/.cargo/config/toml ]]
echo "[net]\ngit-fetch-with-cli = true" > ~/.cargo/config.toml
fi
# Configure MacOS
# Fast keyrepeat
defaults write -g InitialKeyRepeat -int 15 # normal minimum is 15 (225 ms)
defaults write -g KeyRepeat -int 1 # normal minimum is 2 (30 ms)
# Disable Accent Menu when you hold down a key
defaults write -g ApplePressAndHoldEnabled -bool false
# Hide desktop icons
defaults write com.apple.finder CreateDesktop false; killall Finder
# Dock on the right
defaults write com.apple.dock autohide -int 1; defaults write com.apple.dock orientation -string right; killall Dock
# VSCode Vim
defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false
defaults delete -g ApplePressAndHoldEnabled
# iTerm2: load settings from a shared directory
defaults write com.googlecode.iterm2.plist PrefsCustomFolder -string "~/github/dotfiles/iterm2"
defaults write com.googlecode.iterm2.plist LoadPrefsFromCustomFolder -bool true