-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnew-mac.sh
135 lines (126 loc) · 6.26 KB
/
new-mac.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
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
#!/bin/bash
set +xeu
# Prerequisites
## Homebrew
which -s brew
if [[ $? != 0 ]] ; then
# Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
else
brew update
fi
## Install Brewfile
brew bundle install
# System Preferences
## Keyboard
defaults write -g ApplePressAndHoldEnabled -bool true
## Dock
defaults write com.apple.dock orientation -string bottom
defaults write com.apple.dock "show-recents" -int 0
defaults write com.apple.dock tilesize -int 37
defaults write com.apple.dock largesize -int 49
defaults write com.apple.dock autohide -int 1
defaults write com.apple.dock magnification -int 1
defaults write com.apple.dock "minimize-to-application" -int 1
## Hot Corners
defaults write com.apple.dock "wvous-br-corner" -int 4 # Show Desktop
defaults write com.apple.dock "wvous-br-modifier" -int 0
defaults write com.apple.dock "wvous-tr-corner" -int 10 # Lock Screen
defaults write com.apple.dock "wvous-tr-modifier" -int 0
## Finder
defaults write com.apple.finder AppleShowAllFiles -string YES
defaults write com.apple.finder ShowStatusBar -int 1
defaults write com.apple.finder ShowPathbar -int 1
defaults write com.apple.finder SidebarTagsSctionDisclosedState -int 0
defaults write com.apple.finder SidebarPlacesSectionDisclosedState -int 1
defaults write com.apple.finder SidebarDevicesSectionDisclosedState -int 0
## Other
defaults write ~/Library/Preferences/.GlobalPreferences.plist "com.apple.trackpad.forceClick" -int 0
defaults write ~/Library/Preferences/.GlobalPreferences.plist "WebAutomaticSpellingCorrectionEnabled" -int 0
defaults write ~/Library/Preferences/.GlobalPreferences.plist "AppleActionOnDoubleClick" -string "Maximize"
defaults write ~/Library/Preferences/.GlobalPreferences.plist "AppleInterfaceStyle" -string "Dark"
defaults write ~/Library/Preferences/.GlobalPreferences.plist "CGDisableCursorLocationMagnification" -int 1
defaults write ~/Library/Preferences/.GlobalPreferences.plist "NSAutomaticCapitalizationEnabled" -int 0
defaults write ~/Library/Preferences/.GlobalPreferences.plist "NSAutomaticDashSubstitutionEnabled" -int 0
defaults write ~/Library/Preferences/.GlobalPreferences.plist "NSAutomaticPeriodSubstitutionEnabled" -int 0
defaults write ~/Library/Preferences/.GlobalPreferences.plist "NSAutomaticQuoteSubstitutionEnabled" -int 0
defaults write ~/Library/Preferences/.GlobalPreferences.plist "NSAutomaticSpellingCorrectionEnabled" -int 0
## Battery
defaults write com.apple.menuextra.battery ShowPercent YES
## Clock
defaults write com.apple.menuextra.clock DateFormat -string "EEE d MMM HH:mm:ss"
defaults write com.apple.menuextra.clock FlashDateSeparators int 0
defaults write com.apple.menuextra.clock IsAnalog -int 0
## Three finger drag
defaults write ~/Library/Preferences/com.apple.driver.AppleBluetoothMultitouch.trackpad.plist "TrackpadThreeFingerDrag" -int 1
defaults write ~/Library/Preferences/com.apple.AppleMultitouchTrackpad.plist "TrackpadThreeFingerDrag" -int 1
defaults write ~/Library/Preferences/com.apple.driver.AppleBluetoothMultitouch.trackpad.plist "TrackpadThreeFingerHorizSwipeGesture" -int 0
defaults write ~/Library/Preferences/com.apple.AppleMultitouchTrackpad.plist "TrackpadThreeFingerHorizSwipeGesture" -int 0
defaults write ~/Library/Preferences/com.apple.driver.AppleBluetoothMultitouch.trackpad.plist "Clicking" -int 1
defaults write ~/Library/Preferences/com.apple.AppleMultitouchTrackpad.plist "Clicking" -int 1
### VSCode Extenions
code --install-extension DavidAnson.vscode-markdownlint
code --install-extension eamodio.gitlens
code --install-extension EditorConfig.EditorConfig
code --install-extension fabiospampinato.vscode-diff
code --install-extension formulahendry.github-actions
code --install-extension mathiasfrohlich.Kotlin
code --install-extension mauve.terraform
code --install-extension ms-azuretools.vscode-docker
code --install-extension ms-kubernetes-tools.vscode-kubernetes-tools
code --install-extension ms-mssql.mssql
code --install-extension redhat.java
code --install-extension redhat.vscode-yaml
code --install-extension ryu1kn.partial-diff
code --install-extension sidneys1.gitconfig
code --install-extension technosophos.vscode-helm
code --install-extension tht13.html-preview-vscode
code --install-extension VisualStudioExptTeam.vscodeintellicode
code --install-extension vscjava.vscode-java-debug
code --install-extension vscjava.vscode-java-dependency
code --install-extension vscjava.vscode-java-pack
code --install-extension vscjava.vscode-java-test
code --install-extension vscjava.vscode-maven
code --install-extension yzhang.markdown-all-in-one
code --install-extension zhuangtongfa.Material-theme
## ZSH Install
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
## kube-shell
pip3 install kube-shell
# Dock Cleanup
dockutil --remove 'Contacts' --no-restart
dockutil --remove 'Maps' --no-restart
dockutil --remove 'Photos' --no-restart
dockutil --remove 'Messages' --no-restart
dockutil --remove 'FaceTime' --no-restart
dockutil --remove 'News' --no-restart
dockutil --remove 'App Store' --no-restart
dockutil --remove 'Launchpad' --no-restart
dockutil --remove 'Siri' --no-restart
dockutil --remove 'Downloads' --no-restart
dockutil --remove 'Notes' --no-restart
dockutil --remove 'Reminders' --no-restart
dockutil --remove 'Pages' --no-restart
dockutil --remove 'Numbers' --no-restart
dockutil --remove 'Keynote' --no-restart
dockutil --remove 'iTunes' --no-restart
dockutil --remove 'Podcasts' --no-restart
dockutil --remove 'TV' --no-restart
dockutil --remove 'Mail' --no-restart
dockutil --remove 'Calendar' --no-restart
dockutil --remove 'Music' --no-restart
dockutil --remove 'System Preferences' --no-restart
dockutil --remove 'Safari' --no-restart
dockutil --add "/Applications/Firefox.app" --after 'Finder' --no-restart
dockutil --add "/Applications/Visual Studio Code.app" --after 'Finder' --no-restart
dockutil --add "/Applications/Spotify.app" --after 'Finder' --no-restart
dockutil --add "/Applications/Slack.app" --after 'Finder' --no-restart
dockutil --add "/Applications/Utilities/Terminal.app" --after 'Finder' --no-restart
# Restart Desktop
killall Dock
killall Finder
killall SystemUIServer
# Finito
echo ""
echo "All done, cheers 🙌"
echo "You will need to logout and back in again for some changes to take effect!"