-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·65 lines (50 loc) · 1.9 KB
/
setup.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
55
56
57
58
59
60
61
62
63
64
65
#!/bin/zsh
echo "Starting setup..."
echo "Removing everthing from macbook dock and autohiding..."
defaults write com.apple.dock persistent-apps -array
defaults write com.apple.dock persistent-others -array
defaults write com.apple.dock autohide -bool true
killall Dock
echo "Enabling natural scrolling"
echo "Disabling two finger right click..."
echo "Disabling swipe navigation..."
defaults write -g com.apple.swipescrolldirection -bool true
defaults write com.apple.AppleMultitouchTrackpad TrackpadRightClick -bool false
defaults write -g AppleEnableSwipeNavigateWithScrolls -bool false
echo 'Turning keyboard repeat up and keyboard delay down'
defaults write -g InitialKeyRepeat -int 10
defaults write -g KeyRepeat -int 1
echo 'Restarting system ui for preferences to take hold...'
killall SystemUIServer
echo "Mapping caps lock to control..."
hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x7000000E0}]}'
if ! command -v brew &> /dev/null
then
echo "Homebrew not found. Installing Homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
else
echo "Homebrew found. Updating and upgrading..."
brew update
brew upgrade
fi
echo 'Installing homebrew applications...'
brew install git
brew install asdf
brew install --cask google-chrome
brew install --cask google-drive
brew install --cask iterm2
brew install --cask slack
brew install --cask spotify
brew install --cask 1password
echo "Creating basic directories..."
mkdir ~/stuff
mkdir ~/workspace
echo 'Linking .zshrc...'
ln -s ~/workspace/dotfiles/.zshrc ~/.zshrc
source ~/.zshrc
echo 'Linking .gitconfig...'
ln -s ~/workspace/dotfiles/.gitconfig ~/.gitconfig
echo 'Linking .gitignore...'
ln -s ~/workspace/dotfiles/.gitignore ~/.gitignore
echo 'Linking Neovim configuration...'
ln -s ~/workspace/dotfiles/nvim ~/.config/nvim