-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathosx.sh
109 lines (75 loc) · 4.31 KB
/
osx.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
#!/bin/bash
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
###############################################################################
# General UI/UX #
###############################################################################
# Menu bar: disable transparency
defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
# Increase window resize speed for Cocoa applications
defaults write NSGlobalDomain NSWindowResizeTime -float 0.001
# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
# Save to disk (not to iCloud) by default
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
# Disable Resume system-wide
defaults write NSGlobalDomain NSQuitAlwaysKeepsWindows -bool false
# Disable automatic termination of inactive apps
defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true
# Check for software updates daily, not just once per week
defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1
# Automatically show scrollbars based on input
defaults write NSGlobalDomain AppleShowScrollBars -string "Automatic"
###############################################################################
# Finder #
###############################################################################
# Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons
defaults write com.apple.finder QuitMenuItem -bool true
# Finder: disable window animations and Get Info animations
defaults write com.apple.finder DisableAllAnimations -bool true
# 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
# Avoid creating .DS_Store files on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
# Use column view in all Finder windows by default
# Four-letter codes for all view modes: `icnv`, `Nlsv`, `clmv`, `Flwv`
defaults write com.apple.finder FXPreferredViewStyle -string "clmv"
# Empty Trash securely by default
defaults write com.apple.finder EmptyTrashSecurely -bool true
###############################################################################
# Dock & hot corners #
###############################################################################
# Autohide the Dock
defaults write com.apple.dock autohide -bool true
# Set the icon size of Dock items to 36 pixels
defaults write com.apple.dock tilesize -int 32
# Set the icon size of magnified items to 72 pixels
defaults write com.apple.dock largesize -int 64
# Magnify Dock icons on hover
defaults write com.apple.dock magnification -bool true
# Don’t animate opening applications from the Dock
defaults write com.apple.dock launchanim -bool false
# Enable the 2D Dock
defaults write com.apple.dock no-glass -bool true
# Bottom left screen corner → Start screen saver
defaults write com.apple.dock wvous-bl-corner -int 5
defaults write com.apple.dock wvous-bl-modifier -int 0
# No persistent apps
defaults write com.apple.dock persistent-apps -array
###############################################################################
# Sleep #
###############################################################################
# deep sleep after 24 hours instead of the default 70 minutes
sudo pmset -a standbydelay 86400
###############################################################################
# Random stuff #
###############################################################################
# link jsc
ln -s /System/Library/Frameworks/JavaScriptCore.framework/Versions/Current/Resources/jsc ~/bin
# disable showing release notes for QuickSilver upgrades
defaults write com.blacktree.quicksilver "Show Release Notes on Upgrade" NO
echo "Done. Now go restart to make sure everything works."