forked from sobolevn/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
macos
138 lines (93 loc) · 4.21 KB
/
macos
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 -e
# This file contains settings for mac which makes me happy.
# It is not a full list.
#
# The best resource of finding new settings for other users is:
# https://www.defaults-write.com
#
# Some parts are taken from:
# - https://github.com/rootbeersoup/dotfiles
# - https://github.com/skwp/dotfiles
#
# All values are sorted inside their blocks: newest are on the top.
#
echo 'Configuring your mac. Hang tight.'
osascript -e 'tell application "System Preferences" to quit'
# === General ===
# Show remaining battery time; hide percentage
defaults write com.apple.menuextra.battery ShowPercent -string "NO"
defaults write com.apple.menuextra.battery ShowTime -string "YES"
# Disable dashboard:
defaults write com.apple.dashboard mcx-disabled -bool true
# Disable startup noise:
sudo nvram SystemAudioVolume=%01
# Mojave renders fonts that are too thin for me, use regular pre-mojave style:
defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO
# Scrollbars visible when scrolling:
defaults write NSGlobalDomain AppleShowScrollBars -string "WhenScrolling"
# Allways use expanded save dialog:
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
# This line deactivates rubber scrolling:
# http://osxdaily.com/2012/05/10/disable-elastic-rubber-band-scrolling-in-mac-os-x/
defaults write -g NSScrollViewRubberbanding -int 0
# Maximize windows on double clicking them:
defaults write -g AppleActionOnDoubleClick 'Maximize'
# Disable multitouch swipes:
defaults write -g AppleEnableSwipeNavigateWithScrolls -int 0
# Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
# 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
# === Dock ===
# Show indicator lights for open apps in Dock:
defaults write com.apple.dock show-process-indicators -bool true
# Dock size and location:
defaults write com.apple.Dock size-immutable -bool yes
# Show Dock instantly:
defaults write com.apple.dock autohide-delay -float 0
# Automatically hide and show the Dock
defaults write com.apple.dock autohide -bool true
# === Finder ===
# Keep folders on top when sorting by name:
defaults write com.apple.finder _FXSortFoldersFirst -bool true
# Show Finder path bar:
defaults write com.apple.finder ShowPathbar -bool true
# Do not show status bar in Finder:
defaults write com.apple.finder ShowStatusBar -bool false
# Show hidden files in Finder:
defaults write com.apple.finder AppleShowAllFiles YES
# Show file extensions in Finder:
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Allow quitting Finder via ⌘ + Q; doing so will also hide desktop icons
defaults write com.apple.finder QuitMenuItem -bool true
# Allow text selection in Quick Look
defaults write com.apple.finder QLEnableTextSelection -bool true
# Display full POSIX path as Finder window title
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
# Avoid creating .DS_Store files on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
# Disable the warning when changing a file extension
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
# === Safari ===
# Privacy: don’t send search queries to Apple
defaults write com.apple.Safari UniversalSearchEnabled -bool false
defaults write com.apple.Safari SuppressSearchSuggestions -bool true
# === Text editing ===
# Disable smart quotes:
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
# Disable autocorrect:
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
# Disable auto-capitalization:
defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false
# Disable smart dashes:
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
# Diable automatic period substitution:
defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false
# Restarting apps:
echo 'Restarting apps...'
killall Finder
killall Dock
echo 'Done!'