-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexecutable_dot_macos
More file actions
167 lines (131 loc) · 6.33 KB
/
executable_dot_macos
File metadata and controls
167 lines (131 loc) · 6.33 KB
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
#!/usr/bin/env bash
# Close any open System Preferences panes, to prevent them from overriding
# settings we’re about to change
osascript -e 'tell application "System Settings" to quit'
###############################################################################
# Dock & Hot Corners #
###############################################################################
# Autohide the Dock when the mouse is out
defaults write com.apple.dock "autohide" -bool "true"
# Make Dock icons of hidden applications translucent
defaults write com.apple.dock showhidden -bool true
# Don't show recently used applications in the Dock
defaults write com.apple.dock show-recents -bool false
# Instantly open the dock
# defaults write com.apple.dock "autohide-delay" -float "0"
# Remove the animation when hiding/showing the Dock
# defaults write com.apple.dock "autohide-time-modifier" -float "0"
# Group windows by application in Mission Control.
defaults write com.apple.dock "expose-group-apps" -bool "true"
# Scroll up on a Dock icon to show all Space's opened windows for an app, or open stack.
defaults write com.apple.dock "scroll-to-open" -bool "true"
# Hot corners
# Possible values:
# 0: No Option
# 2: Mission Control
# 3: Show application windows
# 4: Desktop
# 5: Start screen saver
# 6: Disable screen saver
# 7: Dashboard
# 10: Put display to sleep
# 11: Launchpad
# 12: Notification Center
# 13: Lock Screen
# Modifiers:
# 0: No Modifier
# 131072: Shift Key
# 262144: Control Key
# 524288: Option Key
# 1048576: Command Key
# Top right screen corner → Desktop
defaults write com.apple.dock wvous-tr-corner -int 4
defaults write com.apple.dock wvous-tr-modifier -int 0
# Rest nothing
defaults write com.apple.dock wvous-tl-corner -int 0
defaults write com.apple.dock wvous-bl-corner -int 0
defaults write com.apple.dock wvous-br-corner -int 0
###############################################################################
# Finder #
###############################################################################
# Finder: show all filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Finder: show status bar
defaults write com.apple.finder ShowStatusBar -bool true
# Finder: show path bar
defaults write com.apple.finder ShowPathbar -bool true
# Keep folders on top when sorting by name
defaults write com.apple.finder _FXSortFoldersFirst -bool true
# Use list view in all Finder windows by default
# Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv`
defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"
# Avoid creating .DS_Store files on network or USB volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
# Rearrange toolbar
defaults write com.apple.finder "NSToolbar Configuration Browser" '{
"TB Default Item Identifiers" = (
"com.apple.finder.BACK",
"com.apple.finder.SWCH",
NSToolbarSpaceItem,
"com.apple.finder.ARNG",
"com.apple.finder.SHAR",
"com.apple.finder.LABL",
"com.apple.finder.ACTN",
NSToolbarSpaceItem,
"com.apple.finder.SRCH"
);
"TB Display Mode" = 2;
"TB Icon Size Mode" = 1;
"TB Is Shown" = 1;
"TB Item Identifiers" = (
"com.apple.finder.BACK",
"com.apple.finder.AirD",
"com.apple.finder.SHAR",
NSToolbarSpaceItem,
"com.apple.finder.SWCH",
"com.apple.finder.ARNG",
"com.apple.finder.LABL",
"com.apple.finder.ACTN",
NSToolbarSpaceItem,
"com.apple.finder.SRCH"
);
"TB Size Mode" = 1;
}'
###############################################################################
# Printer #
###############################################################################
# Expand print panel by default
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true
# Automatically quit printer app once the print jobs complete
defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true
###############################################################################
# Track Pad #
###############################################################################
# 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
# Enable 3-finger drag. (Moving with 3 fingers in any window "chrome" moves the window.)
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeFingerDrag -bool true
defaults write com.apple.AppleMultitouchTrackpad "TrackpadThreeFingerDrag" -bool "true"
###############################################################################
# Messages #
###############################################################################
# # Disable automatic emoji substitution (i.e. use plain text smileys)
defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticEmojiSubstitutionEnablediMessage" -bool false
###############################################################################
# Other #
###############################################################################
echo "Doing a soft restart of affected apps. You should restart when everything is finished."
for app in "Finder" "Dock"; do
killall $app
done
echo 'Next, we will set the screen to lock after 5 seconds after screen saver starts or display is turned off.'
sysadminctl -screenLock 5 -password -
echo "Done! Note that some of these changes require a logout/restart to take effect."
exit 0