-
Notifications
You must be signed in to change notification settings - Fork 0
/
mac.sh
executable file
·145 lines (125 loc) · 5.59 KB
/
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
136
137
138
139
140
141
142
143
144
145
echo 'zsh'
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
echo 'zsh'
yes | cp .zshrc ~/.zshrc
yes | cp oxide.zsh-theme ~/.oh-my-zsh/custom/themes/oxide.zsh-theme
echo 'brew'
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install git firefox dropbox google-chrome the-unarchiver vlc spectacle postman vscodium fnm
brew install --cask transmission
brew install --cask docker
brew install --cask linearmouse
brew install --cask plex-media-server
brew install --cask keepingyouawake
brew install --cask steam
brew install --cask stretchly
brew install --cask arc
echo 'npm'
fnm install 20
source ~/.zshrc
npm install -g yarn
echo 'screenshots'
mkdir -p ~/Screenshots
echo 'git'
git config --global user.name "David Sinclair"
git config --global user.email "dsincla@rei.com"
git config pull.rebase false
echo 'vscode'
codium --install-extension EditorConfig.EditorConfig
codium --install-extension dbaeumer.vscode-eslint
codium --install-extension esbenp.prettier-vscode
codium --install-extension eamodio.gitlens
codium --install-extension robbowen.synthwave-vscode
codium --install-extension octref.vetur
mkdir -p ~/Library/Application\ Support/VSCodium/User/snippets/
yes | cp vscode/snippets/* ~/Library/Application\ Support/VSCodium/User/snippets/
yes | cp vscode/settings.json ~/Library/Application\ Support/VSCodium/User/
echo 'scroll direction'
defaults write -g com.apple.swipescrolldirection -bool NO
echo 'dock'
defaults write com.apple.Dock autohide-delay -float 0
defaults write com.apple.Dock autohide -bool true
defaults write com.apple.dock 'orientation' -string 'bottom'
defaults write com.apple.dock launchanim -bool false
defaults write com.apple.dock tilesize -integer 40
defaults write com.apple.dock persistent-apps -array
echo 'recent apps in dock'
defaults write com.apple.dock show-recents -bool FALSE
echo 'password policies'
pwpolicy -clearaccountpolicies
echo 'finder preferences'
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy name" ~/Library/Preferences/com.apple.finder.plist
defaults write com.apple.finder DisableAllAnimations -bool true
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
echo 'column view'
defaults write com.apple.finder FXPreferredViewStyle -string "clmv"
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool false
defaults write com.apple.finder ShowHardDrivesOnDesktop -bool false
defaults write com.apple.finder ShowMountedServersOnDesktop -bool false
defaults write com.apple.finder ShowRecentTags -int 0
defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool false
defaults write com.apple.finder ShowStatusBar -bool true
defaults write com.apple.finder WarnOnEmptyTrash -boolean false
defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES
echo 'other preferences'
defaults write NSGlobalDomain AppleWindowTabbingMode -string 'always'
defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool true
defaults -currentHost write com.apple.screensaver idleTime -int 0
defaults write CGDisableCursorLocationMagnification -bool YES
defaults write com.apple.BezelServices kDim -bool false
defaults write com.apple.CrashReporter DialogType -string "none"
defaults write com.apple.LaunchServices LSQuarantine -bool false
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
defaults write com.apple.iokit.AmbientLightSensor "Automatic Display Enabled" -int 0
defaults write com.apple.iokit.AmbientLightSensor "Automatic Keyboard Enabled" -int 0
defaults write com.apple.screencapture location ~/Screenshots
defaults write com.apple.screensaver askForPassword -int 1
defaults write com.apple.screensaver askForPasswordDelay -int 1800
defaults write com.apple.screensaver idleTime -int 0
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
defaults write NSGlobalDomain AppleShowScrollBars -string "Always"
defaults write NSGlobalDomain KeyRepeat -int 1
defaults write NSGlobalDomain InitialKeyRepeat -int 15
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain NSWindowResizeTime -float 0.001
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
echo 'reset for settings'
killall Finder
killall Dock
echo 'sleep'
sudo pmset -a sleep 0
sudo pmset -a displaysleep 10
sudo pmset -a disksleep 60
sudo pmset -a autorestart 1
sudo pmset -a acwake 1
sudo pmset -a lessbright 0
sudo pmset -a halfdim 0
echo 'apps from anywhere'
sudo spctl --master-disable
echo 'library'
chflags nohidden ~/Library
# echo 'sdkman'
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install java 8.0.222.hs-adpt
echo 'android'
brew install ant
brew install maven
brew install gradle
brew cask install android-sdk
brew cask install android-ndk
yes | sudo sdkmanager --licenses
echo 'desktop'
yes | cp desktop.jpg ~/Pictures
part1='tell application "System Events" to set picture of every desktop to ("/Users/'
part2='/Pictures/desktop.jpg" as POSIX file as alias)'
osascript -e "$part1$USER$part2"
echo 'computer'
sudo scutil --set ComputerName "$USER"
sudo scutil --set HostName "$USER"
sudo scutil --set LocalHostName "$USER"
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "$USER"