Skip to content

Commit d66fc79

Browse files
user1user1
user1
authored and
user1
committed
Minor cleanup
1 parent cb33109 commit d66fc79

7 files changed

+60
-15009
lines changed

Info MacOS Daemons.rtf

-11,465
This file was deleted.

Info iOS Daemons.rtf

-3,476
This file was deleted.
File renamed without changes.

MacOS_UI_performance.sh

-22
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,6 @@ defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
2020
defaults write com.apple.Mail DisableReplyAnimations -bool true
2121
defaults write com.apple.Mail DisableSendAnimations -bool true
2222

23-
# If using uBar4 these are redundant
24-
defaults write com.apple.dock autohide-time-modifier -float 0
25-
defaults write com.apple.dock autohide-delay -float 0
26-
defaults write com.apple.dock expose-animation-duration -float 0
27-
defaults write com.apple.dock springboard-show-duration -float 0
28-
defaults write com.apple.dock springboard-hide-duration -float 0
29-
defaults write com.apple.dock springboard-page-duration -float 0
30-
defaults write com.apple.dock launchanim -bool false
31-
32-
# uBar 4 Changes
33-
# Hide 'uBar' from the uBar menu. Use YES instead of NO to restore it.
34-
# defaults write ca.brawer.uBar menuAbout -bool NO
35-
# Make apps that have a single window open, use the title of that window. Use NO instead of YES to use the app name.
36-
defaults write ca.brawer.uBar singleWindowUsesTitle -bool YES
37-
# Show the window count in grouped app tiles. Use NO instead of YES to hide the count.
38-
defaults write ca.brawer.uBar showWindowCount -bool YES
39-
# Use the document icon for windows. Use YES instead of NO to use the app icon when possible.
40-
defaults write ca.brawer.uBar useAppIconForWindows -bool NO
41-
# Practically hide the Apple Dock by making it’s auto-hide delay 1000 seconds.
42-
defaults write com.apple.dock autohide-delay -float 1000 && killall Dock
43-
# defaults delete com.apple.dock autohide-delay && killall Dock # Restore Apple Dock
44-
4523
# Keyboard Speed
4624
defaults write NSGlobalDomain KeyRepeat -int 1
4725
defaults write NSGlobalDomain InitialKeyRepeat -int 10

MacOS_other_settings.sh

+50-34
Original file line numberDiff line numberDiff line change
@@ -3,56 +3,48 @@
33

44
# some useful settings, mostly cribbed from https://github.com/mathiasbynens/dotfiles/blob/master/.osx
55

6-
# Disable window animations
7-
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool NO
8-
96
# Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)
107
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
118

129
# Show remaining battery percentage
1310
defaults write com.apple.menuextra.battery ShowPercent -string "YES"
1411
defaults write com.apple.menuextra.battery ShowTime -string "NO"
1512

13+
# Finder
14+
# Show the ~/Library folder by default
15+
chflags nohidden ~/Library
1616
# Show all filename extensions in Finder
1717
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
18-
1918
# Show all files in finder and open file dialogs
2019
defaults write NSGlobalDomain AppleShowAllFiles -bool true
21-
22-
# Disable disk image verification
23-
#defaults write com.apple.frameworks.diskimages skip-verify -bool true
24-
#defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true
25-
#defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true
26-
2720
# Automatically open a new Finder window when a read only volume is mounted
2821
defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true
2922
defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true
30-
3123
# Display full POSIX path as Finder window title
3224
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
33-
3425
# Avoid creating .DS_Store files on network volumes
3526
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
36-
3727
# Empty Trash securely by default
3828
defaults write com.apple.finder EmptyTrashSecurely -bool true
29+
# Disable disk image verification
30+
#defaults write com.apple.frameworks.diskimages skip-verify -bool true
31+
#defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true
32+
#defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true
3933

4034
# Map bottom right Trackpad corner to right-click
4135
#defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadCornerSecondaryClick -int 2
4236
#defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true
4337

38+
# Safari
4439
# Disable Safari’s thumbnail cache for History and Top Sites
4540
defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2
46-
4741
# Enable Safari’s debug menu
4842
defaults write com.apple.Safari IncludeDebugMenu -bool true
49-
5043
# Remove useless icons from Safari’s bookmarks bar
5144
defaults write com.apple.Safari ProxiesInBookmarksBar "()"
5245

5346
# Disable the Ping sidebar in iTunes
5447
defaults write com.apple.iTunes disablePingSidebar -bool true
55-
5648
# Disable all the other Ping stuff in iTunes
5749
defaults write com.apple.iTunes disablePing -bool true
5850

@@ -63,7 +55,6 @@ defaults write com.apple.QuickTimePlayerX.LSSharedFileList RecentDocuments -dict
6355

6456
# Disable (some) MacOS Analytics
6557
sudo defaults write /Library/Application\ Support/CrashReporter/DiagnosticMessagesHistory.plist AutoSubmit -int 0
66-
6758
# Disable (some) MacOS Diagnostics
6859
echo "Checking if a configuration profile is configured for Apple Diagnostics; (investigate if something is returned)"
6960
/usr/bin/sudo /usr/sbin/system_profiler SPConfigurationProfileDataType | /usr/bin/grep allowDiagnosticSubmission
@@ -74,12 +65,10 @@ echo "Checking if a configuration profile is configured for Apple Diagnostics; (
7465
sudo /usr/libexec/PlistBuddy -c "Add :AutoSubmit bool NO" "/Library/Application Support/CrashReporter/DiagnosticMessagesHistory.plist"
7566
sudo /usr/libexec/PlistBuddy -c "Add :ThirdPartyDataSubmit bool NO" "/Library/Application Support/CrashReporter/DiagnosticMessagesHistory.plist"
7667

77-
# Show the ~/Library folder by default
78-
chflags nohidden ~/Library
79-
8068
# Don't use native OSX full screen mode with iTerm2 (annoying animations)
8169
defaults write com.googlecode.iterm2 UseLionStyleFullscreen -bool false
8270

71+
# iTerm2
8372
# Prompt on quit in iTerm2
8473
defaults write com.googlecode.iterm2 PromptOnQuit -bool true
8574
# Use visual bell in iTerm2
@@ -93,16 +82,39 @@ defaults write com.googlecode.iterm2 CheckTestRelease -bool false
9382
defaults write com.googlecode.iterm2 ShowNewOutputIndicator -bool false
9483
# Hide iTerm2 tab number, I prefer to see more of the cwd path
9584
defaults write com.googlecode.iterm2 HideTabNumber -bool true
96-
9785
# Don't use native OSX full screen mode with MacVim (annoying animations)
9886
defaults write org.vim.MacVim MMNativeFullScreen -int 0
9987

100-
# Kill affected applications
88+
# Apple Dock
89+
# If using uBar4 changes are redundant
90+
defaults write com.apple.dock autohide-time-modifier -float 0
91+
defaults write com.apple.dock autohide-delay -float 0
92+
defaults write com.apple.dock expose-animation-duration -float 0
93+
defaults write com.apple.dock springboard-show-duration -float 0
94+
defaults write com.apple.dock springboard-hide-duration -float 0
95+
defaults write com.apple.dock springboard-page-duration -float 0
96+
defaults write com.apple.dock launchanim -bool false
97+
98+
# uBar4
99+
# Hide 'uBar' from the uBar menu. Use YES instead of NO to restore it.
100+
# defaults write ca.brawer.uBar menuAbout -bool NO
101+
# Make apps that have a single window open, use the title of that window. Use NO instead of YES to use the app name.
102+
defaults write ca.brawer.uBar singleWindowUsesTitle -bool YES
103+
# Show the window count in grouped app tiles. Use NO instead of YES to hide the count.
104+
defaults write ca.brawer.uBar showWindowCount -bool YES
105+
# Use the document icon for windows. Use YES instead of NO to use the app icon when possible.
106+
defaults write ca.brawer.uBar useAppIconForWindows -bool NO
107+
# Practically hide the Apple Dock by making it’s auto-hide delay 1000 seconds.
108+
defaults write com.apple.dock autohide-delay -float 1000 && killall Dock
109+
# defaults delete com.apple.dock autohide-delay && killall Dock # Restore Apple Dock
110+
111+
# Restarting affected applications
112+
echo "Restarting Apps to apply changes"
101113
for app in Finder Dock SystemUIServer Safari Mail; do killall "$app"; done
102114

103115
# DISABLING AirDrop; Apple advised Meter, UCLA, and other vendors, networking issues were caused by the “Apple Wireless Direct Link” interface, which helps power features like AirDrop and AirPlay:
104116
# https://gist.github.com/pythoninthegrass/8073e5e3b24f385c9d9b712f6f243982
105-
echo "Disabling 'Apple Wireless Direct Link' Interface (Handoff/Continuity/AirDrop/AirPlay etc)"
117+
echo "Shutting 'Apple Wireless Direct Link' Interface (Handoff/Continuity/AirDrop/AirPlay etc)"
106118
sudo ifconfig awdl0 down
107119
echo "To make AirDrop Interface disable permanent. See; https://github.com/jamestut/awdlkiller"
108120

@@ -114,15 +126,7 @@ cd fonts
114126
cd ..
115127
rm -rf fonts
116128

117-
echo "Deleting all local timemachine snapshots (does not impact external backups)"
118-
for d in $(tmutil listlocalsnapshotdates | grep "-"); do sudo tmutil deletelocalsnapshots $d; done
119-
120-
echo "Deleting all local temp Caches"
121-
sudo rm -rf ~/Library/Caches/*
122-
123-
echo "Deleting all local logs"
124-
sudo rm -rf ~/Library/Logs/*
125-
129+
echo "Installing XCode-Select"
126130
xcode-select --install
127131
sudo xcode-select --reset
128132

@@ -132,9 +136,21 @@ sudo mdutil -a -i off
132136
echo "Disabling Brew Analytics"
133137
brew analytics off
134138

139+
echo "Starting Cleanup Actions"
140+
echo "Deleting all local timemachine snapshots (does not impact external backups)"
141+
for d in $(tmutil listlocalsnapshotdates | grep "-"); do sudo tmutil deletelocalsnapshots $d; done
142+
echo "Deleting all local temp Caches"
143+
sudo rm -rf ~/Library/Caches/*
144+
echo "Deleting all local temp logs"
145+
sudo rm -rf ~/Library/Logs/*
146+
135147
echo "Run system profiler with; sudo /usr/sbin/system_profiler"
136148
echo "Clean up syslog and aslmanager etc; sudo rm -rf /var/log/asl/*"
137149
echo "Enable "Displays have separate spaces" in settings, so menubars for applications stay in same window as the Application.."
138150

139-
echo "TODO - Delete any found JAVA (or disable - Java can be disabled in System Preferences)"
140-
echo "TODO - Remove any found Flash Player"
151+
echo
152+
echo "Uninstall JAVA if not required (or disable - Java can be disabled in System Preferences)"
153+
echo "https://www.java.com/en/download/uninstalltool.jsp"
154+
155+
echo
156+
echo "Uninstall Flash Player"

MacOS_sysctl.sh

+9-11
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,13 @@ if [[ "$recmode" != "y" ]]; then
1010
fi
1111

1212
# Needs further testing (requires machine with at least 32 or 64 GB RAM);
13-
# 18 <string>kern.sysv.shmmax=4194304</string>
14-
# 19 <string>kern.sysv.shmmin=1</string>
15-
# 20 <string>kern.sysv.shmmni=32</string>
16-
# 21 <string>kern.sysv.shmseg=8</string>
17-
# 22 <string>kern.sysv.shmall=1024</string>
18-
# 23 <string>kern.maxfiles=524288</string>
19-
# 24 <string>kern.maxfilesperproc=524288</string>
13+
# <string>kern.sysv.shmmax=4194304</string>
14+
# <string>kern.sysv.shmmin=1</string>
15+
# <string>kern.sysv.shmmni=32</string>
16+
# <string>kern.sysv.shmseg=8</string>
17+
# <string>kern.sysv.shmall=1024</string>
2018

21-
echo "Ventura - Updating com.startup.sysctl.plist"
19+
echo "Ventura - Updating /Library/LaunchDaemons/com.startup.sysctl.plist"
2220
sudo cp -f ./Library_LaunchDaemons_com.startup.sysctl.plist /Library/LaunchDaemons/com.startup.sysctl.plist
2321
sudo chown root:wheel /Library/LaunchDaemons/com.startup.sysctl.plist
2422
# validate key-value pairs
@@ -29,14 +27,14 @@ sudo launchctl bootstrap system /Library/LaunchDaemons/com.startup.sysctl.plist
2927
tail /tmp/sysctl.out
3028
tail /tmp/sysctl.err
3129

32-
echo "Ventura - Updating limit.maxfiles.plist"
33-
sudo cp -f ./limit.maxfiles.plist /Library/LaunchDaemons/limit.maxfiles.plist
30+
echo "Ventura - Updating /Library/LaunchDaemons/limit.maxfiles.plist"
31+
sudo cp -f ./Library_LaunchDaemons_limit.maxfiles.plist /Library/LaunchDaemons/limit.maxfiles.plist
3432
sudo chown root:wheel /Library/LaunchDaemons/limit.maxfiles.plist
3533
plutil /Library/LaunchDaemons/limit.maxfiles.plist
3634
sudo launchctl bootstrap system /Library/LaunchDaemons/limit.maxfiles.plist
3735
echo
3836

39-
echo "Limits"
37+
echo "System Limits"
4038
limit
4139

4240
echo "NOTICE; You can Re-enable SIP now!!! (reboot, cmd# + R, csrutil enable)"

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Significantly increases keyboard speed. Safe for most use cases.
127127
Applies common MacOS general optimisation settings.\
128128
Adds powerline fonts (See https://ohmyz.sh/).\
129129
Adds Apple X-Code runtime libraries.\
130-
Deletes local timemachine snapshots (does not break real time machine backups), and local caches\
130+
Deletes local timemachine snapshots (does not impact external disk time machine backups), and local caches\
131131
Deletes local temp caches and application logs\
132132
Warning; Disables Spotlight (make sure you have alternative like Alfred).\
133133
Warning; Disables awdl0 interface (Handoff/Continuity/AirDrop/AirPlay etc).

0 commit comments

Comments
 (0)