-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.macos
executable file
·73 lines (57 loc) · 2.85 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
#!/usr/bin/env bash
if ! (test -e ~/.daniel-desktop); then
# Remove Intros
rm -rf ~/Documents/About\ Stacks.lpdf
rm -rf ~/Downloads/About\ Downloads.lpdf
# Dock size
defaults write com.apple.dock 'tilesize' -int 42
# Dock content
dockutil --no-restart --remove all
dockutil --no-restart --add '/Applications/iTunes.app'
dockutil --no-restart --add '/Applications/System Preferences.app'
dockutil --no-restart --add '/Applications/Google Chrome.app'
dockutil --no-restart --add '/Applications/VirtualBox.app'
dockutil --no-restart --add '/Applications/TextEdit.app'
dockutil --no-restart --add '/Applications/Utilities/Terminal.app'
dockutil --no-restart --add '/Applications/PhpStorm.app'
dockutil --no-restart --add '~/Downloads' --view grid --display stack
# There's no restart action in dockutil
/usr/bin/killall -HUP cfprefsd
/usr/bin/killall -HUP Dock
# Expand save and print panels by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
# Screenshots
defaults write com.apple.screencapture disable-shadow -bool true
defaults write com.apple.screencapture location ~/Downloads
# Finder
defaults write com.apple.finder ShowStatusBar -bool true
defaults write com.apple.finder NewWindowTarget -string 'PfHm'
defaults write com.apple.finder WarnOnEmptyTrash -bool false
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Finder: Use current directory as default search scope
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
# Trackpad: Tap to click
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
# Trackpad: swipe between pages with three fingers
defaults write NSGlobalDomain AppleEnableSwipeNavigateWithScrolls -bool false
defaults -currentHost write NSGlobalDomain com.apple.trackpad.threeFingerHorizSwipeGesture -int 1
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeFingerHorizSwipeGesture -int 1
# Keyboard: Function keys
defaults write NSGlobalDomain com.apple.keyboard.fnState -bool true
# Keyboard: Key repeat
defaults write NSGlobalDomain KeyRepeat -int 2
defaults write NSGlobalDomain InitialKeyRepeat -int 25
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
# Keyboard: Tab for all controls
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
# Safari
defaults write com.apple.Safari IncludeDebugMenu -bool true
# SSH
sudo perl -pi -e 's/^(\s*SendEnv LANG LC_\*)$/#$1/g' /etc/ssh/ssh_config
touch ~/.daniel-desktop
for app in Finder Dock SystemUIServer; do killall "$app"; done
fi