aboutsummaryrefslogtreecommitdiff
path: root/scripts/setup-mac.sh
blob: 3c16987140a80845b0b55d6c53b39d7dd4e8f61b (plain)
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
#!/usr/bin/env zsh
# Dock on left
defaults write com.apple.dock "orientation" -string "left" && killall Dock
sleep 0.25s

# Set dock icon size
defaults write com.apple.dock "tilesize" -int "25" && killall Dock
sleep 0.25s

# Autohide dock
defaults write com.apple.dock "autohide" -bool "true" && killall Dock
sleep 0.25s

# Dont show recent apps
defaults write com.apple.dock "show-recents" -bool "false" && killall Dock
sleep 0.25s

# Set min animation to scale
defaults write com.apple.dock "mineffect" -string "scale" && killall Dock
sleep 0.25s

# Set dock magnification
defaults write com.apple.dock magnification -bool "true"
defaults write com.apple.dock largesize -int "48"
killall Dock

# Save screenshots to downloads
defaults write com.apple.screencapture "location" -string "~/Downloads" && killall SystemUIServer
sleep 0.25s

# Set Clock
defaults write com.apple.menuextra.clock "DateFormat" -string "\"EEE d MMM HH:mm:ss\""
sleep 0.25s

# Disable the .DS file creation on USB and Network
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
sleep 0.25s

# Hide desktop items and Show the path bar in the Finder
defaults write com.apple.finder "CreateDesktop" -bool "false"
defaults write com.apple.finder "ShowPathbar" -bool "true" && killall Finder
sleep 0.25s

# Show hidden files in the Finder
defaults write com.apple.finder "AppleShowAllFiles" -bool "false" && killall Finder
sleep 0.25s

# Keep folders on top in Finder
defaults write com.apple.finder "_FXSortFoldersFirst" -bool "true" && killall Finder
sleep 0.25s

# Set Key repeat speed
defaults read NSGlobalDomain InitialKeyRepeat -int 15
defaults read NSGlobalDomain KeyRepeat -int 2
sleep 0.25s

# Disable click wallpaper
defaults write com.apple.WindowManager EnableStandardClickToShowDesktop -bool false
killall WindowManager

# Apply the settings
/System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u
sleep 2s