-
Notifications
You must be signed in to change notification settings - Fork 1
/
preferences.sh
96 lines (85 loc) · 2.82 KB
/
preferences.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
path_to_plistbuddy="/usr/libexec/PlistBuddy"
function osx_preferences_synchronize {
/System/Library/Frameworks/Python.framework/Versions/Current/bin/python2 - <<END
from Foundation import CFPreferencesAppSynchronize
CFPreferencesAppSynchronize('$1')
END
}
function osx_preferences_apply {
echo "Resetting Apps For Preferences to Take Effect"
osx_preferences_synchronize com.apple.finder
for app in 'Activity Monitor'\
'Calendar'\
'Contacts'\
'cfprefsd'\
'Dock'\
'Finder'\
'Mail'\
'Messages'\
'Safari'\
'SizeUp'\
'SystemUIServer'\
'Transmission'\
'Twitter'; do
sudo killall "${app}" > /dev/null 2>&1
done
sudo touch /System/Library/Extensions
sudo killall -HUP mDNSResponder > /dev/null 2>&1
dscacheutil -flushcache
sudo find / -xdev -name '.DS_Store' -exec rm -f {} \;
# Give the system time to commit changes from cache.
for (( i = 0; i < 20; i++ )); do
echo "."; sleep 1;
echo "."; sleep 2;
done
echo ""
echo "Some Changes Require a Restart to Take Effect"
}
source './preferences/activity_monitor.sh'
source './preferences/airdrop.sh'
source './preferences/airport.sh'
source './preferences/appearance.sh'
source './preferences/chrome.sh'
source './preferences/dashboard.sh'
source './preferences/debug.sh'
source './preferences/desktop.sh'
source './preferences/dialog.sh'
source './preferences/disk_images.sh'
source './preferences/disk_utility.sh'
source './preferences/displays.sh'
source './preferences/dock.sh'
source './preferences/drives.sh'
source './preferences/energy.sh'
source './preferences/file_vault.sh'
source './preferences/finder.sh'
source './preferences/firewall.sh'
source './preferences/gatekeeper.sh'
source './preferences/hot_corners.sh'
source './preferences/infrared_receiver.sh'
source './preferences/itunes.sh'
source './preferences/keyboard.sh'
source './preferences/launchpad.sh'
source './preferences/locale.sh'
source './preferences/location.sh'
source './preferences/login.sh'
source './preferences/menu_bar.sh'
source './preferences/mission_control.sh'
source './preferences/mouse.sh'
source './preferences/network.sh'
source './preferences/notification_center.sh'
source './preferences/printing.sh'
source './preferences/quicklook.sh'
source './preferences/screen_capture.sh'
source './preferences/screen_sharing.sh'
source './preferences/screensaver.sh'
source './preferences/scrolling.sh'
source './preferences/security.sh'
source './preferences/sound.sh'
source './preferences/spaces.sh'
source './preferences/spotlight.sh'
source './preferences/system.sh'
source './preferences/time_machine.sh'
source './preferences/tooltips.sh'
source './preferences/trash.sh'
source './preferences/universal_access.sh'
source './preferences/windows.sh'