-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.macos
More file actions
executable file
·137 lines (97 loc) · 5.21 KB
/
.macos
File metadata and controls
executable file
·137 lines (97 loc) · 5.21 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
#!/usr/bin/env bash
# --- UI & Interaction ---
# Use 24-hour time
# Why: Standardize logs and timestamps with CLI tools.
defaults write NSGlobalDomain AppleICUForce12HourTime -bool false
# Always show scrollbars
# Why: Prevent layout shift and allow immediate jumping in long files/buffers.
defaults write NSGlobalDomain AppleShowScrollBars -string "Always"
# Always show menubar in fullscreen
# Why: Maintain visibility of system status and clock while in fullscreen apps.
defaults write NSGlobalDomain AppleMenuBarVisibleInFullscreen -int 1
# Disable "Click wallpaper to reveal desktop" (Sonoma/Sequoia)
# Why: Prevent background clicks from hiding active windows.
defaults write com.apple.WindowManager EnableStandardClickToShowDesktop -bool false
# Disable "Natural" scrolling
# Why: Maintain traditional mouse wheel behavior for better precision.
defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false
# --- Window Management & Speed ---
# Speed up Mission Control animations
# Why: Minimize latency when switching between spaces and windows.
defaults write com.apple.dock expose-animation-duration -float 0.1
# Remove the delay when hovering over window proxy icons
# Why: Enable immediate dragging of files via the window title icon.
defaults write NSGlobalDomain NSToolbarTitleViewRolloverDelay -float 0
# Speed up the dialog for saving and printing
# Why: Reduce animation overhead on high-refresh displays.
defaults write NSGlobalDomain NSWindowResizeTime -float 0.001
# Disable the "Stage Manager" recent apps strip by default
# Why: Maximize screen real estate for terminal and editor windows.
defaults write com.apple.WindowManager AppWindowGroupingBehavior -int 1
# --- Terminal.app ---
# Import all profiles from the repository
# Why: Automate the installation of visual themes (fonts, colors, cursor) stored in the repo.
for profile in "$HOME/homedir/terminal/"*.terminal; do
if [ -f "$profile" ]; then
open "$profile"
fi
done
# Set "Basic" as the default and startup profile
# Why: Ensure new windows and app launches use the primary customized profile.
defaults write com.apple.Terminal "Default Window Settings" -string "Basic"
defaults write com.apple.Terminal "Startup Window Settings" -string "Basic"
# --- Developer Productivity ---
# Expand save and print panels by default
# Why: Avoid additional clicks to view the full file system or print options.
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
# Disable smart quotes and dashes
# Why: Prevent the OS from replacing ASCII characters with syntax-breaking curly variants.
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
# Enable key repeat
# Why: Enable character repeat when holding keys for faster navigation in Sublime Text.
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
# --- Finder ---
# Show all filename extensions
# Why: Distinguish between similar file types (e.g., .js vs .ts) in the project tree.
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Default to Column View
# Why: Maintain hierarchical context when navigating deep project structures.
defaults write com.apple.finder FXPreferredViewStyle -string "clmv"
# Search the current folder by default
# Why: Limit search results to the active workspace.
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
# Avoid creating .DS_Store files on network/USB volumes
# Why: Prevent metadata clutter on shared drives and external storage.
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
# --- Safari ---
# Enable Develop Menu and Web Inspector
# Why: Access DOM inspection and web debugging tools.
defaults write com.apple.Safari IncludeDevelopMenu -bool true
defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true
# Show full URL in address bar
# Why: Verify the full path, routing, and subdomains during development.
defaults write com.apple.Safari ShowFullURLInSmartSearchField -bool true
# --- Security ---
# Password required 5 seconds after sleep
# Why: Balance immediate accessibility with local station security.
defaults write com.apple.screensaver askForPassword -int 1
defaults write com.apple.screensaver askForPasswordDelay -int 5
# --- Sublime Text CLI ---
# Why: Enable the 'subl' command-line helper for opening files/projects from the terminal.
if [ -f "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" ]; then
ln -sf "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
fi
# --- SSH Multiplexing Setup ---
# Why: Create a dedicated, secure directory for SSH control sockets.
# Keeping them in a subfolder prevents clobbering ~/.ssh with temporary socket files.
mkdir -p ~/.ssh/control
chmod 700 ~/.ssh/control
# Clean up
for app in "Dock" "Finder" "Safari" "Terminal" "SystemUIServer"; do
killall "${app}" &> /dev/null
done
echo "macOS configuration and Terminal profiles updated."