+36
dots/dump-keybinds-mac.sh
+36
dots/dump-keybinds-mac.sh
···
1
+
#!/usr/bin/env bash
2
+
3
+
defaults export com.apple.symbolichotkeys - > /tmp/symbolichotkeys.plist
4
+
plutil -convert json -o /tmp/symbolichotkeys.json /tmp/symbolichotkeys.plist
5
+
cat /tmp/symbolichotkeys.json | \
6
+
jq -r '
7
+
.AppleSymbolicHotKeys
8
+
| to_entries
9
+
| map(
10
+
" \"" + .key + "\" = {\n" +
11
+
" enabled = " + (
12
+
if (.value.enabled == 1 or .value.enabled == true) then
13
+
"true"
14
+
else
15
+
"false"
16
+
end
17
+
) + ";\n" +
18
+
(
19
+
if (.value.value? and .value.value.parameters? and .value.value.type?) then
20
+
" value = {\n" +
21
+
" parameters = [ " + (
22
+
.value.value.parameters
23
+
| map(tostring)
24
+
| join(" ")
25
+
) + " ];\n" +
26
+
" type = \"" + .value.value.type + "\";\n" +
27
+
" };\n"
28
+
else
29
+
""
30
+
end
31
+
) +
32
+
" };\n"
33
+
)
34
+
| " AppleSymbolicHotKeys = {\n" + ( join("") ) + " };\n"
35
+
'
36
+
+112
machines/atalanta/default.nix
+112
machines/atalanta/default.nix
···
107
107
VISUAL = "nvim";
108
108
};
109
109
110
+
# nothing but finder in the doc
111
+
system.defaults.dock = {
112
+
persistent-apps = [ ];
113
+
114
+
tilesize = 47;
115
+
show-recents = false;
116
+
};
117
+
118
+
# allow using apple watch or touch id for sudo
119
+
security.pam.services.sudo_local.touchIdAuth = true;
120
+
security.pam.services.sudo_local.watchIdAuth = true;
121
+
122
+
system.defaults = {
123
+
finder.FXPreferredViewStyle = "Nlsv";
124
+
finder.AppleShowAllExtensions = true;
125
+
# expand the save dialogs
126
+
NSGlobalDomain.NSNavPanelExpandedStateForSaveMode = true;
127
+
NSGlobalDomain.NSNavPanelExpandedStateForSaveMode2 = true;
128
+
LaunchServices.LSQuarantine = false; # disables "Are you sure?" for new apps
129
+
loginwindow.GuestEnabled = false;
130
+
131
+
NSGlobalDomain."com.apple.trackpad.scaling" = 0.875;
132
+
133
+
CustomSystemPreferences = {
134
+
"com.apple.DiskArbitration.diskarbitrationd" = {
135
+
DADisableEjectNotification = true;
136
+
};
137
+
};
138
+
139
+
CustomUserPreferences = {
140
+
"com.apple.driver.AppleBluetoothMultitouch.mouse" = {
141
+
MouseButtonMode = "TwoButton";
142
+
};
143
+
"com.apple.WindowManager" = {
144
+
EnableTiledWindowMargins = false;
145
+
};
146
+
"com.apple.desktopservices" = {
147
+
# Avoid creating .DS_Store files on network or USB volumes
148
+
DSDontWriteNetworkStores = true;
149
+
DSDontWriteUSBStores = true;
150
+
};
151
+
"com.apple.AdLib" = {
152
+
allowApplePersonalizedAdvertising = false;
153
+
};
154
+
"com.apple.SoftwareUpdate" = {
155
+
AutomaticCheckEnabled = true;
156
+
# Check for software updates daily, not just once per week
157
+
ScheduleFrequency = 1;
158
+
# Download newly available updates in background
159
+
AutomaticDownload = 1;
160
+
# Install System data files & security updates
161
+
CriticalUpdateInstall = 1;
162
+
};
163
+
# keybindings
164
+
# Script to export symbolic hotkey configs from MacOS
165
+
# https://gist.github.com/sawadashota/8e7ce32234e0f07a03e955f22ec4c0f9
166
+
# Screenshot selected area to file with Cmd+Option+Shift+4
167
+
"com.apple.symbolichotkeys" = {
168
+
AppleSymbolicHotKeys = {
169
+
# Screenshot selected area with Option+Cmd+Shift+4
170
+
"30" = {
171
+
enabled = true;
172
+
value = {
173
+
parameters = [
174
+
52
175
+
21
176
+
1703936
177
+
];
178
+
type = "standard";
179
+
};
180
+
};
181
+
# Screenshot selected area to clipboard with Cmd+Shift+4
182
+
"31" = {
183
+
enabled = true;
184
+
value = {
185
+
parameters = [
186
+
52
187
+
21
188
+
1179648
189
+
];
190
+
type = "standard";
191
+
};
192
+
};
193
+
# Fullscreen screenshot Option+Cmd+Shift+3
194
+
"28" = {
195
+
enabled = true;
196
+
value = {
197
+
parameters = [
198
+
51
199
+
20
200
+
1703936
201
+
];
202
+
type = "standard";
203
+
};
204
+
};
205
+
# Fullscreen screenshot to clipboard Cmd+Shift+3
206
+
"29" = {
207
+
enabled = true;
208
+
value = {
209
+
parameters = [
210
+
51
211
+
20
212
+
1179648
213
+
];
214
+
type = "standard";
215
+
};
216
+
};
217
+
};
218
+
};
219
+
};
220
+
};
221
+
110
222
# Used for backwards compatibility, please read the changelog before changing
111
223
system.stateVersion = 4;
112
224
}