-
Notifications
You must be signed in to change notification settings - Fork 151
/
osx
executable file
·71 lines (58 loc) · 3.34 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
#!/bin/bash
# vi:ft=sh
# Adopted from https://github.com/mathiasbynens/dotfiles/blob/7d43ff6/.osx
set -e
# Set a blazingly fast keyboard repeat rate
defaults write NSGlobalDomain KeyRepeat -int 2
defaults write NSGlobalDomain InitialKeyRepeat -int 25
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
# Disable all sorts of autocorrection
defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
# Enable full keyboard access for all controls (e.g. Tab in modal dialogs)
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
# Press Tab to highlight each item on a web page
defaults write com.apple.Safari WebKitTabToLinksPreferenceKey -bool true
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2TabsToLinks -bool true
# Enable the Develop menu and the Web Inspector in Safari
defaults write com.apple.Safari IncludeDevelopMenu -bool true
defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled -bool true
# Set Safari’s home page to `about:blank` for faster loading
defaults write com.apple.Safari HomePage -string "about:blank"
# Disable site favorites when focusing Safari’s URL bar
defaults write com.apple.Safari ShowFavoritesUnderSmartSearchField -bool false
# Disable preloading top hit in the background
defaults write com.apple.Safari PreloadTopHit -bool false
# Disable Quick Website Search
defaults write com.apple.Safari WebsiteSpecificSearchEnabled -bool false
# Stop Safari from offering to store passwords and credit card data
defaults write com.apple.Safari AutoFillPasswords -bool false
defaults write com.apple.Safari AutoFillCreditCardData -bool false
defaults write com.apple.Safari AutoFillFromAddressBook -bool false
defaults write com.apple.Safari AutoFillMiscellaneousForms -bool false
# Trackpad: enable tap to click for this user and for the login screen
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
# Show the ~/Library folder
chflags nohidden ~/Library
# Disable Dashboard
defaults write com.apple.dashboard mcx-disabled -bool true
# Don’t show Dashboard as a Space
defaults write com.apple.dock dashboard-in-overlay -bool true
# Automatically hide the Dock
if [ "$(defaults read com.apple.dock autohide 2>/dev/null)" != 1 ]; then
defaults write com.apple.dock autohide -bool true
killall Dock
fi
# Configure iTerm2 to read preferences from Dropbox
defaults write com.googlecode.iterm2 PrefsCustomFolder ~/Dropbox
defaults write com.googlecode.iterm2 LoadPrefsFromCustomFolder -int 1
# Set lock screen text
[ -n "$(defaults read /Library/Preferences/com.apple.loginwindow LoginwindowText 2>/dev/null)" ] || \
sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText \
'Found this computer? Please contact Mislav Marohnić at [email protected]'