forked from csuhta/environment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathosx
executable file
·138 lines (97 loc) · 5.16 KB
/
osx
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
#!/usr/bin/env bash
# Set custom OS X defaults
# -----------------------------------------------------------------------------
# GENERAL UI
# -----------------------------------------------------------------------------
# Save to disk (not to iCloud) by default
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
# Automatically quit printer app once the print jobs complete
defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true
# Disable automatic termination of inactive apps
defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true
# -----------------------------------------------------------------------------
# DOCK
# -----------------------------------------------------------------------------
# Disable Dashboard completely
defaults write com.apple.dashboard mcx-disabled -boolean YES
# Enable the 2D Dock
defaults write com.apple.dock no-glass -bool true
# Set the icon size of Dock items to 44 pixels
defaults write com.apple.dock tilesize -int 44
# Show indicator lights for open applications
defaults write com.apple.dock show-process-indicators -bool true
# Use the scale effect for window minimizing
defaults write com.apple.dock mineffect scale
# Speed up Mission Control animations
defaults write com.apple.dock expose-animation-duration -float 0.1
# -----------------------------------------------------------------------------
# FINDER
# -----------------------------------------------------------------------------
# Show all filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Disable the warning when changing a file extension
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
# Show the ~/Library folder (in OS X Lion)
chflags nohidden ~/Library
# Hide the ~/Public folder
chflags hidden ~/Public
# Use column view in all windows by default
# Four-letter codes for views modes: `icnv`, `Nlsv`, `clmv`, `Flwv`
defaults write com.apple.finder FXPreferredViewStyle -string "clmv"
# Show no mounted media on the desktop
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 ShowRemovableMediaOnDesktop -bool false
# -----------------------------------------------------------------------------
# SHEETS/PANELS
# -----------------------------------------------------------------------------
# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
# Expand print panel by default
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
# Disable the “Are you sure you want to open this application?” dialog
defaults write com.apple.LaunchServices LSQuarantine -bool false
# Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
# -----------------------------------------------------------------------------
# SCREEN
# -----------------------------------------------------------------------------
# Require password immediately after sleep or screen saver begins
defaults write com.apple.screensaver askForPassword -int 1
defaults write com.apple.screensaver askForPasswordDelay -int 0
# Save screenshots to ~/Pictures/Screenshots
mkdir ~/Pictures/Screenshots
defaults write com.apple.screencapture location -string "$HOME/Pictures/Screenshots"
# Disable shadow in screenshots
defaults write com.apple.screencapture disable-shadow -bool true
# Enable subpixel font rendering on non-Apple LCDs
defaults write NSGlobalDomain AppleFontSmoothing -int 2
# -----------------------------------------------------------------------------
# DISKS
# -----------------------------------------------------------------------------
# Avoid creating .DS_Store files on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
# Disable Time Machine prompts when attaching USB media
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
# -----------------------------------------------------------------------------
# ITUNES
# -----------------------------------------------------------------------------
# Disable the Ping sidebar in iTunes
defaults write com.apple.iTunes disablePingSidebar -bool true
# Disable all the other Ping stuff
defaults write com.apple.iTunes disablePing -bool true
# -----------------------------------------------------------------------------
# MISC
# -----------------------------------------------------------------------------
# Only use UTF-8 in Terminal.app
defaults write com.apple.terminal StringEncodings -array 4
# Disable spotlight Dictionary results
defaults write com.apple.spotlight DictionaryLookupEnabled -bool false
# -----------------------------------------------------------------------------
# HUP ALL THE THINGS
# Restart OS X services after running the script
# -----------------------------------------------------------------------------
for app in "Dashboard" "Dock" "Finder" "SystemUIServer" "Terminal" "iTunes"; do
killall "$app" > /dev/null 2>&1
done