-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsystem_setup.sh
More file actions
162 lines (137 loc) · 5.71 KB
/
system_setup.sh
File metadata and controls
162 lines (137 loc) · 5.71 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
#!/bin/bash
# ============================================
# macOS System Settings
# ============================================
echo "⚙️ Configuring macOS settings..."
# ============================================
# Default Browser
# - 명령 자체는 즉시 리턴 (non-blocking)
# - macOS 대화상자가 백그라운드에 뜸 → 시간될 때 "Use Chrome" 클릭
# ============================================
echo "🌐 Setting Chrome as default browser..."
defaultbrowser chrome
echo "✅ Chrome set as default (다이얼로그 클릭 필요)"
# ============================================
# Keyboard Shortcuts (키보드 단축키 설정)
# - Cmd+Space = 입력 소스 변경
# - Ctrl+Space = Spotlight
# ============================================
echo "⌨️ Setting keyboard shortcuts..."
# Modifier keys:
# 262144 = Ctrl
# 1048576 = Cmd
# Key codes:
# 49 = Space
# 32 = Space (ASCII)
# Spotlight 검색: Ctrl+Space (key 64)
defaults write com.apple.symbolichotkeys AppleSymbolicHotKeys -dict-add 64 \
"<dict>
<key>enabled</key><true/>
<key>value</key>
<dict>
<key>type</key><string>standard</string>
<key>parameters</key>
<array>
<integer>32</integer>
<integer>49</integer>
<integer>262144</integer>
</array>
</dict>
</dict>"
# 입력 소스 변경: Cmd+Space (key 60)
defaults write com.apple.symbolichotkeys AppleSymbolicHotKeys -dict-add 60 \
"<dict>
<key>enabled</key><true/>
<key>value</key>
<dict>
<key>type</key><string>standard</string>
<key>parameters</key>
<array>
<integer>32</integer>
<integer>49</integer>
<integer>1048576</integer>
</array>
</dict>
</dict>"
# 변경사항 즉시 적용
/System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u
echo "✅ Keyboard shortcuts ready"
# ============================================
# Keyboard Repeat Speed (키 반복 속도)
# - KeyRepeat: 키 반복 속도 (작을수록 빠름, 슬라이더 최대 = 2)
# - InitialKeyRepeat: 첫 반복까지 딜레이 (작을수록 짧음, 슬라이더 최소 = 15)
# - 적용: 로그아웃 후 다시 로그인
# ============================================
echo "⌨️ Setting keyboard repeat to max speed..."
defaults write -g KeyRepeat -int 2
defaults write -g InitialKeyRepeat -int 15
echo "✅ Keyboard repeat configured (logout 필요)"
# ============================================
# Screensaver Idle Time (움직임 없을 때 화면보호기)
# - 1분 후 시작
# ============================================
echo "🖼️ Setting screensaver idle to 1 minute..."
defaults -currentHost write com.apple.screensaver idleTime -int 60
echo "✅ Screensaver idle configured"
# ============================================
# Prevent Sleep on AC Power
# - "Prevent automatic sleeping when the display is off"에 해당
# - 백그라운드 작업 항상 돌리려고 비활성화
# ============================================
echo "🔋 Disabling automatic sleep on power adapter..."
sudo pmset -c sleep 0
echo "✅ Sleep on AC disabled"
# ============================================
# Mouse / Trackpad Tracking Speed
# - 슬라이더 끝에서 약 3칸 남긴 위치 (~2.0)
# - 마우스, 트랙패드 모두 동일 값
# ============================================
echo "🖱️ Setting tracking speed..."
defaults write -g com.apple.mouse.scaling -float 2.0
defaults write -g com.apple.trackpad.scaling -float 2.0
echo "✅ Tracking speed configured"
# ============================================
# Secondary Click (마우스 우클릭 / 트랙패드 보조 클릭)
# - Magic Mouse: 우측 클릭 활성화
# - Trackpad: 두 손가락 클릭으로 우클릭
# ============================================
echo "🖱️ Enabling secondary click (right-click)..."
# Magic Mouse (Bluetooth, USB 모두)
defaults write com.apple.driver.AppleBluetoothMultitouch.mouse MouseButtonMode -string "TwoButton"
defaults write com.apple.driver.AppleHIDMouse Button2 -int 2
# Trackpad: 두 손가락 클릭 = 보조 클릭
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true
defaults write com.apple.AppleMultitouchTrackpad TrackpadRightClick -bool true
defaults -currentHost write NSGlobalDomain com.apple.trackpad.enableSecondaryClick -bool true
defaults -currentHost write NSGlobalDomain com.apple.trackpad.trackpadCornerClickBehavior -int 1
echo "✅ Secondary click enabled"
# ============================================
# Dock Settings (Dock 설정)
# - Finder, Calendar 만 남기고 나머지 제거
# - Auto-hide 활성화
# ============================================
echo "🖥️ Configuring Dock..."
# Dock에서 모든 앱 제거 (Finder는 시스템에서 자동으로 유지됨)
defaults write com.apple.dock persistent-apps -array
# Calendar 추가
defaults write com.apple.dock persistent-apps -array-add \
"<dict>
<key>tile-data</key>
<dict>
<key>file-data</key>
<dict>
<key>_CFURLString</key><string>/System/Applications/Calendar.app</string>
<key>_CFURLStringType</key><integer>0</integer>
</dict>
</dict>
</dict>"
# Auto-hide Dock 활성화
defaults write com.apple.dock autohide -bool true
# Auto-hide 딜레이 제거 (즉시 나타남)
defaults write com.apple.dock autohide-delay -float 0
# Auto-hide 애니메이션 속도 (빠르게)
defaults write com.apple.dock autohide-time-modifier -float 0.3
# Dock 재시작하여 변경사항 적용
killall Dock
echo "✅ Dock configured"
echo "✅ macOS settings ready"