-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmacos.sh
84 lines (60 loc) · 3.43 KB
/
macos.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
#!/bin/bash
# ------------------------------------------------------------------------------
# Configure the default MacOS preferences.
# More info: https://macos-defaults.com/
# ------------------------------------------------------------------------------
# Close any open System Preferences panes, to prevent them from overriding
# settings we’re about to change
osascript -e 'tell application "System Preferences" to quit'
# ------------------------------------------------------------------------------
# General
# ------------------------------------------------------------------------------
# Choose default file save location to disk. Default is true (iCloud).
defaults write NSGlobalDomain "NSDocumentSaveNewDocumentsToCloud" -bool false
# Always show scrollbars.
# Possible values: `WhenScrolling`, `Automatic` and `Always`
defaults write NSGlobalDomain "AppleShowScrollBars" -string "Always"
# Show all file extensions in the Finder. Default is false.
defaults write NSGlobalDomain "AppleShowAllExtensions" -bool true
# ------------------------------------------------------------------------------
# Dock
# ------------------------------------------------------------------------------
# Put the Dock on the left of the screen. Default is "bottom".
defaults write com.apple.dock "orientation" -string "left"
# Set the icon size of Dock items to 36 pixels. Default is 48 pixels.
defaults write com.apple.dock "tilesize" -int 36
# Disable resizing of the macOS dock. Default is false.
defaults write com.apple.dock "size-immutable" -bool true
# Change the Dock minimize animation to scale. Default is "genie".
defaults write com.apple.dock "mineffect" -string "scale"
# Make Dock icons of hidden applications translucent. Default is false.
defaults write com.apple.dock "showhidden" -bool true
# Don’t show recent applications in Dock. Default is true.
defaults write com.apple.dock "show-recents" -bool false
# Minimize windows into their application’s icon. Default is false.
defaults write com.apple.dock "minimize-to-application" -bool true
# Don’t automatically rearrange Spaces based on most recent use. Default is true.
defaults write com.apple.dock "mru-spaces" -bool false
# ------------------------------------------------------------------------------
# Finder
# ------------------------------------------------------------------------------
# Keep folders on top. Default is false.
defaults write com.apple.finder "_FXSortFoldersFirst" -bool true
# Keep folders on top when sorting. Default is false.
defaults write com.apple.finder "_FXSortFoldersFirstOnDesktop" -bool true
# Automatically empty bin after 30 days. Default is false.
defaults write com.apple.finder "FXRemoveOldTrashItems" -bool true
# 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
# ------------------------------------------------------------------------------
# Printers
# ------------------------------------------------------------------------------
# Automatically quit printer app once the print jobs complete
defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true
# ------------------------------------------------------------------------------
# Kill
# ------------------------------------------------------------------------------
# kill affected apps to apply changes
killall Dock
killall Finder