-
Notifications
You must be signed in to change notification settings - Fork 0
/
macos_install.sh
executable file
·54 lines (42 loc) · 1.47 KB
/
macos_install.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
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
set -xe
if ! xcode-select -p &>/dev/null; then
xcode-select --install
else
echo "Xcode Command Line Tools are already installed."
fi
# Install brew
if ! type -P brew; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo >> /Users/joshua/.zprofile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/joshua/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
brew bundle
mkdir -p ~/.nvm # nvm, installed by brew, requires this to exist
# symlink dotfiles
ln -sf ~/dotfiles/.vimrc ~/.vimrc
ln -sf ~/dotfiles/.bashrc ~/.bashrc
ln -sf ~/dotfiles/.tmux.conf ~/.tmux.conf
ln -sf ~/dotfiles/.gitconfig ~/.gitconfig
ln -sf ~/dotfiles/.zshrc ~/.zshrc
ln -sf ~/dotfiles/.zimrc ~/.zimrc
# Disable font smoothing (might?) require reboot
# from https://tonsky.me/blog/monitors/
defaults -currentHost write -g AppleFontSmoothing -int 0
# Only show open applications in the Dock
defaults write com.apple.dock static-only -bool true;
# Enable keyboard control at the macOS level (for navigating web pages on Safari, e.g.)
# See: https://www.a11yproject.com/posts/macos-browser-keyboard-navigation/
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
# Setup 1password SSH agent
touch ~/.ssh/config
cat << EOF >> ~/.ssh/config
Host *
IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
EOF
# relaunch Finder
killall Finder
# relaunch Dock
killall Dock
echo "Run \`zimfw install\`"