-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathosx
executable file
·88 lines (56 loc) · 2.56 KB
/
osx
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
#!/bin/sh
# Reference: https://macos-defaults.com/
nuke() {
command killall "$1" >/dev/null 2>&1
}
# Put the Dock on the left of the screen
defaults write com.apple.dock "orientation" -string "left"
# Autohide the Dock when the mouse is out
defaults write com.apple.dock "autohide" -bool "true"
# Remove the autohide delay, the Dock appears instantly
defaults write com.apple.dock "autohide-delay" -float "0"
# Remove the Dock autohide animation
defaults write com.apple.dock "autohide-time-modifier" -float "0"
# Do not display recent apps in the Dock
defaults write com.apple.dock "show-recents" -bool "false"
# Minimize does scale animation
defaults write com.apple.dock "mineffect" -string "scale"
# Restart dock
nuke Dock
# Safari: Show full website URL
defaults write com.apple.safari "ShowFullURLInSmartSearchField" -bool "true"
# Restart Safari
nuke Safari
# Display the Finder "Quit" option
defaults write com.apple.finder "QuitMenuItem" -bool "true"
# Show all file extensions inside the Finder
defaults write NSGlobalDomain "AppleShowAllExtensions" -bool "true"
# Show hidden files inside the Finder
defaults write com.apple.finder "AppleShowAllFiles" -bool "true"
# Add pathbar to bottom of Finder
defaults write com.apple.finder "ShowPathbar" -bool "true"
# Default to list view
defaults write com.apple.finder "FXPreferredViewStyle" -string "Nlsv"
# Keep folders on top when searching by name
defaults write com.apple.finder "_FXSortFoldersFirst" -bool "true"
# Default to searching the current folder
defaults write com.apple.finder "FXDefaultSearchScope" -string "SCcf"
# Do not display the warning when changing file extension
defaults write com.apple.finder "FXEnableExtensionChangeWarning" -bool "false"
# Remove the delay when hovering the toolbar title
defaults write NSGlobalDomain "NSToolbarTitleViewRolloverDelay" -float "0"
# Desktop: keep folders on top
defaults write com.apple.finder "_FXSortFoldersFirstOnDesktop" -bool "true"
# Restart
nuke Finder
# Key auto-repeat enabled
defaults write NSGlobalDomain "ApplePressAndHoldEnabled" -bool "false"
# Short key repeat delay
defaults write com.apple.Accessibility "KeyRepeatDelay" -float "0.5"
# Faster key repeat speed
defaults write com.apple.Accessibility "KeyRepeatInterval" -float "0.083333333"
# Remap capslock to control
#
# Keycodes:
# https://developer.apple.com/library/archive/technotes/tn2450/_index.html#//apple_ref/doc/uid/DTS40017618-CH1-KEY_TABLE_USAGES
hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc": 0x700000039, "HIDKeyboardModifierMappingDst": 0x7000000E0}]}'