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