forked from meson10/mac_tej
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nos.sh
268 lines (226 loc) · 13 KB
/
nos.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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
#---------------------------------------------------------------------
# Remove Spotlight
#---------------------------------------------------------------------
sudo mdutil -a -i off
sudo chmod 600 /System/Library/CoreServices/Search.bundle/Contents/MacOS/Search; killall SystemUIServer
#sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
#---------------------------------------------------------------------
# Remove Notification Center
#---------------------------------------------------------------------
sudo chmod 600 /System/Library/CoreServices/NotificationCenter.app/Contents/MacOS/NotificationCenter;killall NotificationCenter; killall Dock
launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist
#---------------------------------------------------------------------
# Minimize Dock
#---------------------------------------------------------------------
sudo defaults write com.apple.dock pinning -string start
sudo defaults write com.apple.dock tilesize -int 20
#---------------------------------------------------------------------
# Remove Dashboard
#---------------------------------------------------------------------
sudo defaults write com.apple.dashboard mcx-disabled -boolean YES
#---------------------------------------------------------------------
# Disbale MissionControl
#---------------------------------------------------------------------
sudo defaults write com.apple.dock mcx-expose-disabled -bool TRUE
#---------------------------------------------------------------------
# Disbale Hibernation
#---------------------------------------------------------------------
sudo pmset -a hibernatemode 0
sudo rm -rf /var/run/sleepimage
sudo rm -rf /private/var/run/sleepimage
#---------------------------------------------------------------------
# Disbale ReportCrash
#---------------------------------------------------------------------
sudo defaults write com.apple.CrashReporter DialogType none
launchctl unload -w /System/Library/LaunchAgents/com.apple.ReportCrash.Self.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.ReportCrash.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.ReportPanic.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.ReportGPURestart.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.SocialPushAgent.plist
launchctl unload -w /System/Library/LaunchDaemons/com.apple.ReportCrash.Root.plist
#---------------------------------------------------------------------
# Disbale faceTime
#---------------------------------------------------------------------
launchctl unload -w /System/Library/LaunchAgents/com.apple.imagent.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.iChat.Theater.plist
#---------------------------------------------------------------------
# Disbale AppStoreHelpers
#---------------------------------------------------------------------
#launchctl unload -w /System/Library/LaunchAgents/com.apple.storeagent.plist
#launchctl unload -w /System/Library/LaunchAgents/com.apple.store_helper.plist
#launchctl unload -w /System/Library/LaunchAgents/com.apple.maspushagent.plist
#launchctl unload -w /System/Library/LaunchAgents/com.apple.softwareupdate_notify_agent.plist
#---------------------------------------------------------------------
# Disbale QuickLookHelper
#---------------------------------------------------------------------
launchctl unload -w /System/Library/LaunchAgents/com.apple.quicklook.32bit.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.quicklook.config.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.quicklook.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.quicklook.ui.helper.plist
#---------------------------------------------------------------------
# Disbale Pasteboard
#---------------------------------------------------------------------
#launchctl unload -w /System/Library/LaunchAgents/com.apple.pboard.plist
#launchctl unload -w /System/Library/LaunchAgents/com.apple.pbs.plist
#---------------------------------------------------------------------
# Disbale Calendar
#---------------------------------------------------------------------
launchctl unload -w /System/Library/LaunchAgents/com.apple.CalendarAgent.plist
#---------------------------------------------------------------------
# Disbale GameCenter
#---------------------------------------------------------------------
launchctl unload -w /System/Library/LaunchAgents/com.apple.gamed.plist
#---------------------------------------------------------------------
# Disbale Twitter
#---------------------------------------------------------------------
launchctl unload -w /System/Library/LaunchAgents/twitterd.plist
#---------------------------------------------------------------------
# Disbale Location
#---------------------------------------------------------------------
launchctl unload -w /System/Library/LaunchDaemons/com.apple.locationd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.locationmenu.plist
#---------------------------------------------------------------------
# Disbale ParentalControl
#---------------------------------------------------------------------
launchctl unload -w /System/Library/LaunchAgents/com.apple.familycontrols.useragent.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.parentalcontrols.check.plist
#---------------------------------------------------------------------
# Disbale Airplay
#---------------------------------------------------------------------
launchctl unload -w /System/Library/LaunchAgents/com.apple.AirPlayUIAgent.plist
#---------------------------------------------------------------------
# Disbale Speech & Voice
#---------------------------------------------------------------------
sudo rm -rf /System/Library/Speech/Voices/
launchctl unload -w /System/Library/LaunchAgents/com.apple.VoiceOver.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.speech.voiceinstallerd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.speech.synthesisserver.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.speech.recognitionserver.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.speech.feedbackservicesserver.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.speech.speechsynthesisd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.speech.speechdatainstallerd.plist
#---------------------------------------------------------------------
# Disbale SWAP
#---------------------------------------------------------------------
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist
sudo rm /private/var/vm/swapfile*
#---------------------------------------------------------------------
# Disbale Sudden Motion Sensor
#---------------------------------------------------------------------
sudo pmset -a sms 0
#---------------------------------------------------------------------
# Disbale Wake on Power
#---------------------------------------------------------------------
sudo pmset -a womp 0
#Push the StandbyDelay(write RAM to SSD) at end of day.
sudo pmset -a standbydelay 0
#---------------------------------------------------------------------
# Disbale AirDrop
#---------------------------------------------------------------------
sudo defaults write com.apple.NetworkBrowser DisableAirDrop -bool YES
#---------------------------------------------------------------------
# Disbale Address Book
#---------------------------------------------------------------------
#launchctl unload -w /System/Library/LaunchAgents/com.apple.AddressBook.SourceSync.plist
#launchctl unload -w /System/Library/LaunchAgents/com.apple.AddressBook.abd.plist
#---------------------------------------------------------------------
# Disbale AirportBase Station
#---------------------------------------------------------------------
launchctl unload -w /System/Library/LaunchAgents/com.apple.AirPortBaseStationAgent.plist
#---------------------------------------------------------------------
# Disbale iCloud Notifications
#---------------------------------------------------------------------
launchctl unload -w /System/Library/LaunchAgents/com.apple.librariand.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.icloud.AOSNotificationAgent.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.icloud.AOSNotificationLoginAgent.plist
#---------------------------------------------------------------------
# Disbale Location TimeMachine Snapshots
#---------------------------------------------------------------------
sudo tmutil disablelocal
#---------------------------------------------------------------------
# Set NoAtime
#---------------------------------------------------------------------
set noAtime
cat << EOF | sudo tee /Library/LaunchDaemons/com.nullvision.noatime.plist > /dev/null
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.nullvision.noatime</string>
<key>ProgramArguments</key>
<array>
<string>mount</string>
<string>-vuwo</string>
<string>noatime</string>
<string>/</string>
</array>
<key>RunAtLoad</key>
<true />
</dict>
</plist>
EOF
chown root:wheel /Library/LaunchDaemons/com.nullvision.noatime.plist
chmod 644 /Library/LaunchDaemons/com.nullvision.noatime.plist
launchctl load -w /Library/LaunchDaemons/com.nullvision.noatime.plist
#---------------------------------------------------------------------
# Remove Printers
#---------------------------------------------------------------------
sudo rm -rf /Library/Printers/
#---------------------------------------------------------------------
# Disbale Thumbnails in Safari Quick Access
#---------------------------------------------------------------------
sudo defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2
#Disable Sync
launchctl unload -w /System/Library/LaunchAgents/com.apple.RemoteDesktop.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.SafariNotificationAgent.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.bookstoreagent.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.UserNotificationCenterAgent.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.UserNotificationCenterAgent-LoginWindow.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.ZoomWindow.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.helpd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.java.updateSharing.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.java.InstallOnDemand.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.screensharing.agent.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.screensharing.MessagesAgent.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.security.cloudkeychainproxy.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.syncservices.SyncServer.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.syncservices.uihandler.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.findmymacmessenger.plist
#Maps?
launchctl unload -w /System/Library/LaunchAgents/com.apple.Maps.pushdaemon.plist
#---------------------------------------------------------------------
# Delete Automator
#---------------------------------------------------------------------
#sudo rm -rf /Applications/Automator.app/
#sudo rm -rf /System/Library/Automator/
#sudo rm -rf /System/Library/CoreServices/Automator\ Launcher.app
#sudo rm -rf /System/Library/CoreServices/System\ Image\ Utility.app/Contents/Library/Automator/
#sudo rm -rf /System/Library/Frameworks/Automator.framework/
#---------------------------------------------------------------------
# I dont use these Applications anyway.
#---------------------------------------------------------------------
sudo rm -rf /Applications/Automator.app/
sudo rm -rf /Applications/iBooks.app/
sudo rm -rf /Applications/Reminders.app/
sudo rm -rf /Applications/Stickies.app/
sudo rm -rf /Applications/TextEdit.app/
sudo rm -rf /Applications/Notes.app/
sudo rm -rf /Applications/Photo\ Booth.app/
sudo rm -rf /Applications/DVD\ Player.app/
sudo rm -rf /Applications/Mission\ Control.app/
sudo rm -rf /Applications/Dashboard.app/
sudo rm -rf /Applications/Dictionary.app/
sudo rm -rf /Applications/Game\ Center.app/
sudo rm -rf /Applications/Calculator.app/
sudo rm -rf /Applications/Calendar.app/
sudo rm -rf /Applications/Chess.app/
sudo rm -rf /System/Library/Screen\ Savers
sudo rm -rf /System/Library/Frameworks/Automator.framework/
sudo rm -rf /System/Library/CoreServices/System\ Image\ Utility.app/Contents/Library/Automator
sudo rm -rf /System/Library/CoreServices/Automator\ Runner.app
sudo rm -rf /System/Library/CoreServices/Automator\ Launcher.app/
sudo rm -rf /Applications/Mail.app/
sudo rm -rf /Applications/Messages.app/
sudo rm -rf /Applications/FaceTime.app/
sudo rm -rf /Applications/Maps.app/