git.fiddlerwoaroof.com
Browse code

chore: Merge remote-tracking branch 'origin/master'

Edward authored on 13/12/2020 02:04:42
Showing 17 changed files
... ...
@@ -81,6 +81,7 @@
81 81
 (use-package scala-mode
82 82
   :ensure t)
83 83
 
84
+
84 85
 (use-package lsp-mode
85 86
   :ensure t
86 87
   :config (setq lsp-enable-snippet nil))
... ...
@@ -199,10 +200,16 @@
199 200
          (new-load-path (cl-adjoin (concat *dotfiles-repo*
200 201
                                            "emacs.d/lisp/configurations/")
201 202
                                    new-load-path
203
+                                   :test 'equal))
204
+         (new-load-path (cl-adjoin (concat *dotfiles-repo*
205
+                                           "emacs.d/packages/")
206
+                                   new-load-path
202 207
                                    :test 'equal)))
203 208
     (setq load-path new-load-path)))
204 209
 
205 210
 (fwoar/setup-load-path)
211
+
212
+
206 213
 (defun fwoar/package-configuration (package)
207 214
   (fwoar/setup-load-path)
208 215
   (let* ((local-configs)
... ...
@@ -418,12 +425,25 @@
418 425
   (add-hook 'js2-mode-hook 'prettier-js-mode)
419 426
   (add-hook 'css-mode 'prettier-js-mode))
420 427
 
428
+(use-package typescript-mode
429
+  :ensure t
430
+  :config
431
+  (add-to-list 'auto-mode-alist
432
+               '("\\.tsx$" . typescript-mode)))
433
+
421 434
 (use-package tide
422 435
   :ensure t
423 436
   :config
424 437
   (add-hook 'js2-mode-hook 'tide-setup)
438
+  (add-hook 'typescript-mode-hook 'tide-setup)
425 439
   (add-hook 'js2-mode-hook 'tide-hl-identifier-mode)
440
+  (add-hook 'typescript-mode-hook 'tide-hl-identifier-mode)
426 441
   (flycheck-add-next-checker 'javascript-eslint 'javascript-tide 'append))
442
+(use-package direnv
443
+  :ensure t
444
+  :config
445
+  (add-hook 'js2-mode-hook 'direnv-mode)
446
+  (add-hook 'typescript-mode-hook 'direnv-mode))
427 447
 
428 448
 (use-package rjsx-mode
429 449
   :ensure t
... ...
@@ -626,7 +646,6 @@ With a prefix ARG invalidates the cache first."
626 646
 (when (file-exists-p custom-file)
627 647
   (load-file custom-file))
628 648
 
629
-
630 649
 (defun edit-init-el ()
631 650
   (interactive)
632 651
   (let ((default-directory *dotfiles-repo*))
... ...
@@ -12,6 +12,7 @@
12 12
   (interactive)
13 13
   (delete-window
14 14
    (get-mru-window nil nil t)))
15
+
15 16
 (use-package evil
16 17
   :ensure t
17 18
   :config
... ...
@@ -41,7 +42,7 @@
41 42
     (evil-define-key 'normal company-mode-map (kbd "TAB") 'company-indent-or-complete-common)
42 43
     (evil-define-key 'insert company-mode-map (kbd "TAB") 'company-indent-or-complete-common))
43 44
 
44
-  (evil-define-key 'normal magit-file-mode-map (kbd "<leader>a") 'magit)
45
+  (evil-define-key 'normal 'global (kbd "<leader>a") 'magit)
45 46
 
46 47
   (progn ;; error jumping
47 48
     (evil-define-key 'motion 'global (kbd "]e") 'flycheck-next-error)
... ...
@@ -141,20 +142,21 @@
141 142
     (evil-define-key 'normal 'global (kbd "<leader>nr") 'narrow-to-region)
142 143
     (evil-define-key 'normal 'global (kbd "<leader>nw") 'widen)))
143 144
 
144
-(use-package centaur-tabs
145
-  :ensure t
146
-  :after evil
147
-  :config
148
-  (setq centaur-tabs-adjust-buffer-order t
149
-        centaur-tabs-adjust-buffer-order 'right)
150
-  (centaur-tabs-enable-buffer-reordering)
151
-
152
-  (evil-define-key 'normal 'global (kbd "gt") 'centaur-tabs-forward-tab)
153
-  (define-key global-map (kbd "<header-line> <wheel-up>") 'centaur-tabs-forward-tab)
154
-  (define-key global-map (kbd "s-}") 'centaur-tabs-forward-tab)
155
-  (evil-define-key 'normal 'global (kbd "gT") 'centaur-tabs-backward-tab)
156
-  (define-key global-map (kbd "<header-line> <wheel-down>") 'centaur-tabs-backward-tab)
157
-  (define-key global-map (kbd "s-{") 'centaur-tabs-backward-tab))
145
+(comment
146
+ (use-package centaur-tabs
147
+   :ensure t
148
+   :after evil
149
+   :config
150
+   (setq centaur-tabs-adjust-buffer-order t
151
+         centaur-tabs-adjust-buffer-order 'right)
152
+   (centaur-tabs-enable-buffer-reordering)
153
+
154
+   (evil-define-key 'normal 'global (kbd "gt") 'centaur-tabs-forward-tab)
155
+   (define-key global-map (kbd "<header-line> <wheel-up>") 'centaur-tabs-forward-tab)
156
+   (define-key global-map (kbd "s-}") 'centaur-tabs-forward-tab)
157
+   (evil-define-key 'normal 'global (kbd "gT") 'centaur-tabs-backward-tab)
158
+   (define-key global-map (kbd "<header-line> <wheel-down>") 'centaur-tabs-backward-tab)
159
+   (define-key global-map (kbd "s-{") 'centaur-tabs-backward-tab)))
158 160
 
159 161
 
160 162
 (defun setup-special-mode ()
... ...
@@ -169,7 +169,7 @@ started from a shell."
169 169
       (server-start))))
170 170
 
171 171
 (defun post-init ()
172
-  (centaur-tabs-mode 1)
172
+  ;;(centaur-tabs-mode 1)
173 173
   (projectile-mode 1)
174 174
   (evil-mode 1)
175 175
 
... ...
@@ -117,9 +117,9 @@
117 117
   (:method ((map list) key)
118 118
            (typecase (car map)
119 119
              (cons (cdr (cl-assoc key map :test 'equal)))
120
-             (t (loop for (a-key . value) on map by #'cddr
121
-                      when (equal key a-key) do
122
-                      (return (car value)))))))
120
+             (t (cl-loop for (a-key . value) on map by #'cddr
121
+                         when (equal key a-key) do
122
+                         (return (car value)))))))
123 123
 
124 124
 (fwoar/def-ns-fun key (key)
125 125
   (lambda (map)
... ...
@@ -153,4 +153,5 @@
153 153
                      (apply f args))
154 154
                    r))))
155 155
 
156
+(provide 'fwoar-functional-utils)
156 157
 ;;; fwoar-functional-utils.el ends here
157 158
new file mode 100644
... ...
@@ -0,0 +1,530 @@
1
+{
2
+    "global": {
3
+        "check_for_updates_on_startup": true,
4
+        "show_in_menu_bar": true,
5
+        "show_profile_name_in_menu_bar": true
6
+    },
7
+    "profiles": [
8
+        {
9
+            "complex_modifications": {
10
+                "parameters": {
11
+                    "basic.simultaneous_threshold_milliseconds": 50,
12
+                    "basic.to_delayed_action_delay_milliseconds": 500,
13
+                    "basic.to_if_alone_timeout_milliseconds": 200,
14
+                    "basic.to_if_held_down_threshold_milliseconds": 500,
15
+                    "mouse_motion_to_scroll.speed": 100
16
+                },
17
+                "rules": [
18
+                    {
19
+                        "manipulators": [
20
+                            {
21
+                                "description": "Change caps_lock to command+control+option+shift.",
22
+                                "from": {
23
+                                    "key_code": "caps_lock",
24
+                                    "modifiers": {
25
+                                        "optional": [
26
+                                            "any"
27
+                                        ]
28
+                                    }
29
+                                },
30
+                                "to": [
31
+                                    {
32
+                                        "key_code": "left_option",
33
+                                        "modifiers": [
34
+                                            "left_command",
35
+                                            "left_control"
36
+                                        ]
37
+                                    }
38
+                                ],
39
+                                "type": "basic"
40
+                            }
41
+                        ]
42
+                    },
43
+                    {
44
+                        "manipulators": [
45
+                            {
46
+                                "description": "map left shift to opening parenthesis",
47
+                                "from": {
48
+                                    "key_code": "left_shift",
49
+                                    "modifiers": {
50
+                                        "optional": []
51
+                                    }
52
+                                },
53
+                                "to": [
54
+                                    {
55
+                                        "key_code": "left_shift",
56
+                                        "modifiers": []
57
+                                    }
58
+                                ],
59
+                                "to_if_alone": [
60
+                                    {
61
+                                        "key_code": "9",
62
+                                        "modifiers": [
63
+                                            "left_shift"
64
+                                        ]
65
+                                    }
66
+                                ],
67
+                                "type": "basic"
68
+                            },
69
+                            {
70
+                                "description": "map left shift to opening parenthesis",
71
+                                "from": {
72
+                                    "key_code": "left_control",
73
+                                    "modifiers": {
74
+                                        "optional": [
75
+                                            "any"
76
+                                        ]
77
+                                    }
78
+                                },
79
+                                "to": [
80
+                                    {
81
+                                        "key_code": "left_control",
82
+                                        "modifiers": []
83
+                                    }
84
+                                ],
85
+                                "to_if_alone": [
86
+                                    {
87
+                                        "key_code": "open_bracket",
88
+                                        "modifiers": [
89
+                                            "left_shift"
90
+                                        ]
91
+                                    }
92
+                                ],
93
+                                "type": "basic"
94
+                            },
95
+                            {
96
+                                "description": "map left shift to opening parenthesis",
97
+                                "from": {
98
+                                    "key_code": "right_control",
99
+                                    "modifiers": {
100
+                                        "optional": [
101
+                                            "any"
102
+                                        ]
103
+                                    }
104
+                                },
105
+                                "to": [
106
+                                    {
107
+                                        "key_code": "right_control",
108
+                                        "modifiers": []
109
+                                    }
110
+                                ],
111
+                                "to_if_alone": [
112
+                                    {
113
+                                        "key_code": "close_bracket",
114
+                                        "modifiers": [
115
+                                            "left_shift"
116
+                                        ]
117
+                                    }
118
+                                ],
119
+                                "type": "basic"
120
+                            },
121
+                            {
122
+                                "description": "map right shift to closing parenthesis",
123
+                                "from": {
124
+                                    "key_code": "right_shift",
125
+                                    "modifiers": {
126
+                                        "optional": [
127
+                                            "any"
128
+                                        ]
129
+                                    }
130
+                                },
131
+                                "to": [
132
+                                    {
133
+                                        "key_code": "right_shift",
134
+                                        "modifiers": []
135
+                                    }
136
+                                ],
137
+                                "to_if_alone": [
138
+                                    {
139
+                                        "key_code": "0",
140
+                                        "modifiers": [
141
+                                            "right_shift"
142
+                                        ]
143
+                                    }
144
+                                ],
145
+                                "type": "basic"
146
+                            }
147
+                        ]
148
+                    }
149
+                ]
150
+            },
151
+            "devices": [
152
+                {
153
+                    "disable_built_in_keyboard_if_exists": false,
154
+                    "fn_function_keys": [],
155
+                    "identifiers": {
156
+                        "is_keyboard": true,
157
+                        "is_pointing_device": false,
158
+                        "product_id": 50475,
159
+                        "vendor_id": 1133
160
+                    },
161
+                    "ignore": false,
162
+                    "manipulate_caps_lock_led": false,
163
+                    "simple_modifications": []
164
+                },
165
+                {
166
+                    "disable_built_in_keyboard_if_exists": false,
167
+                    "fn_function_keys": [],
168
+                    "identifiers": {
169
+                        "is_keyboard": true,
170
+                        "is_pointing_device": false,
171
+                        "product_id": 617,
172
+                        "vendor_id": 1241
173
+                    },
174
+                    "ignore": false,
175
+                    "manipulate_caps_lock_led": false,
176
+                    "simple_modifications": []
177
+                },
178
+                {
179
+                    "disable_built_in_keyboard_if_exists": false,
180
+                    "fn_function_keys": [],
181
+                    "identifiers": {
182
+                        "is_keyboard": true,
183
+                        "is_pointing_device": false,
184
+                        "product_id": 591,
185
+                        "vendor_id": 1452
186
+                    },
187
+                    "ignore": false,
188
+                    "manipulate_caps_lock_led": true,
189
+                    "simple_modifications": []
190
+                },
191
+                {
192
+                    "disable_built_in_keyboard_if_exists": false,
193
+                    "fn_function_keys": [],
194
+                    "identifiers": {
195
+                        "is_keyboard": false,
196
+                        "is_pointing_device": true,
197
+                        "product_id": 36915,
198
+                        "vendor_id": 2522
199
+                    },
200
+                    "ignore": false,
201
+                    "manipulate_caps_lock_led": false,
202
+                    "simple_modifications": []
203
+                },
204
+                {
205
+                    "disable_built_in_keyboard_if_exists": true,
206
+                    "fn_function_keys": [],
207
+                    "identifiers": {
208
+                        "is_keyboard": true,
209
+                        "is_pointing_device": false,
210
+                        "product_id": 45849,
211
+                        "vendor_id": 1133
212
+                    },
213
+                    "ignore": false,
214
+                    "manipulate_caps_lock_led": true,
215
+                    "simple_modifications": [
216
+                        {
217
+                            "from": {
218
+                                "key_code": "left_command"
219
+                            },
220
+                            "to": {
221
+                                "key_code": "left_option"
222
+                            }
223
+                        },
224
+                        {
225
+                            "from": {
226
+                                "key_code": "left_option"
227
+                            },
228
+                            "to": {
229
+                                "key_code": "left_command"
230
+                            }
231
+                        },
232
+                        {
233
+                            "from": {
234
+                                "key_code": "right_option"
235
+                            },
236
+                            "to": {
237
+                                "key_code": "right_command"
238
+                            }
239
+                        }
240
+                    ]
241
+                },
242
+                {
243
+                    "disable_built_in_keyboard_if_exists": false,
244
+                    "fn_function_keys": [],
245
+                    "identifiers": {
246
+                        "is_keyboard": true,
247
+                        "is_pointing_device": true,
248
+                        "product_id": 8963,
249
+                        "vendor_id": 4617
250
+                    },
251
+                    "ignore": false,
252
+                    "manipulate_caps_lock_led": false,
253
+                    "simple_modifications": []
254
+                },
255
+                {
256
+                    "disable_built_in_keyboard_if_exists": false,
257
+                    "fn_function_keys": [],
258
+                    "identifiers": {
259
+                        "is_keyboard": false,
260
+                        "is_pointing_device": true,
261
+                        "product_id": 8963,
262
+                        "vendor_id": 4617
263
+                    },
264
+                    "ignore": false,
265
+                    "manipulate_caps_lock_led": false,
266
+                    "simple_modifications": []
267
+                },
268
+                {
269
+                    "disable_built_in_keyboard_if_exists": false,
270
+                    "fn_function_keys": [],
271
+                    "identifiers": {
272
+                        "is_keyboard": false,
273
+                        "is_pointing_device": true,
274
+                        "product_id": 1,
275
+                        "vendor_id": 6899
276
+                    },
277
+                    "ignore": false,
278
+                    "manipulate_caps_lock_led": false,
279
+                    "simple_modifications": []
280
+                },
281
+                {
282
+                    "disable_built_in_keyboard_if_exists": false,
283
+                    "fn_function_keys": [],
284
+                    "identifiers": {
285
+                        "is_keyboard": true,
286
+                        "is_pointing_device": false,
287
+                        "product_id": 8963,
288
+                        "vendor_id": 4617
289
+                    },
290
+                    "ignore": false,
291
+                    "manipulate_caps_lock_led": false,
292
+                    "simple_modifications": []
293
+                }
294
+            ],
295
+            "fn_function_keys": [
296
+                {
297
+                    "from": {
298
+                        "key_code": "f1"
299
+                    },
300
+                    "to": {
301
+                        "key_code": "display_brightness_decrement"
302
+                    }
303
+                },
304
+                {
305
+                    "from": {
306
+                        "key_code": "f2"
307
+                    },
308
+                    "to": {
309
+                        "key_code": "display_brightness_increment"
310
+                    }
311
+                },
312
+                {
313
+                    "from": {
314
+                        "key_code": "f3"
315
+                    },
316
+                    "to": {
317
+                        "key_code": "mission_control"
318
+                    }
319
+                },
320
+                {
321
+                    "from": {
322
+                        "key_code": "f4"
323
+                    },
324
+                    "to": {
325
+                        "key_code": "launchpad"
326
+                    }
327
+                },
328
+                {
329
+                    "from": {
330
+                        "key_code": "f5"
331
+                    },
332
+                    "to": {
333
+                        "key_code": "illumination_decrement"
334
+                    }
335
+                },
336
+                {
337
+                    "from": {
338
+                        "key_code": "f6"
339
+                    },
340
+                    "to": {
341
+                        "key_code": "illumination_increment"
342
+                    }
343
+                },
344
+                {
345
+                    "from": {
346
+                        "key_code": "f7"
347
+                    },
348
+                    "to": {
349
+                        "key_code": "rewind"
350
+                    }
351
+                },
352
+                {
353
+                    "from": {
354
+                        "key_code": "f8"
355
+                    },
356
+                    "to": {
357
+                        "key_code": "play_or_pause"
358
+                    }
359
+                },
360
+                {
361
+                    "from": {
362
+                        "key_code": "f9"
363
+                    },
364
+                    "to": {
365
+                        "key_code": "fastforward"
366
+                    }
367
+                },
368
+                {
369
+                    "from": {
370
+                        "key_code": "f10"
371
+                    },
372
+                    "to": {
373
+                        "key_code": "mute"
374
+                    }
375
+                },
376
+                {
377
+                    "from": {
378
+                        "key_code": "f11"
379
+                    },
380
+                    "to": {
381
+                        "key_code": "volume_decrement"
382
+                    }
383
+                },
384
+                {
385
+                    "from": {
386
+                        "key_code": "f12"
387
+                    },
388
+                    "to": {
389
+                        "key_code": "volume_increment"
390
+                    }
391
+                }
392
+            ],
393
+            "name": "shift->paren",
394
+            "parameters": {
395
+                "delay_milliseconds_before_open_device": 1000
396
+            },
397
+            "selected": true,
398
+            "simple_modifications": [],
399
+            "virtual_hid_keyboard": {
400
+                "caps_lock_delay_milliseconds": 0,
401
+                "country_code": 0,
402
+                "keyboard_type": "ansi",
403
+                "mouse_key_xy_scale": 100
404
+            }
405
+        },
406
+        {
407
+            "complex_modifications": {
408
+                "parameters": {
409
+                    "basic.simultaneous_threshold_milliseconds": 50,
410
+                    "basic.to_delayed_action_delay_milliseconds": 500,
411
+                    "basic.to_if_alone_timeout_milliseconds": 1000,
412
+                    "basic.to_if_held_down_threshold_milliseconds": 500,
413
+                    "mouse_motion_to_scroll.speed": 100
414
+                },
415
+                "rules": []
416
+            },
417
+            "devices": [],
418
+            "fn_function_keys": [
419
+                {
420
+                    "from": {
421
+                        "key_code": "f1"
422
+                    },
423
+                    "to": {
424
+                        "key_code": "display_brightness_decrement"
425
+                    }
426
+                },
427
+                {
428
+                    "from": {
429
+                        "key_code": "f2"
430
+                    },
431
+                    "to": {
432
+                        "key_code": "display_brightness_increment"
433
+                    }
434
+                },
435
+                {
436
+                    "from": {
437
+                        "key_code": "f3"
438
+                    },
439
+                    "to": {
440
+                        "key_code": "mission_control"
441
+                    }
442
+                },
443
+                {
444
+                    "from": {
445
+                        "key_code": "f4"
446
+                    },
447
+                    "to": {
448
+                        "key_code": "launchpad"
449
+                    }
450
+                },
451
+                {
452
+                    "from": {
453
+                        "key_code": "f5"
454
+                    },
455
+                    "to": {
456
+                        "key_code": "illumination_decrement"
457
+                    }
458
+                },
459
+                {
460
+                    "from": {
461
+                        "key_code": "f6"
462
+                    },
463
+                    "to": {
464
+                        "key_code": "illumination_increment"
465
+                    }
466
+                },
467
+                {
468
+                    "from": {
469
+                        "key_code": "f7"
470
+                    },
471
+                    "to": {
472
+                        "key_code": "rewind"
473
+                    }
474
+                },
475
+                {
476
+                    "from": {
477
+                        "key_code": "f8"
478
+                    },
479
+                    "to": {
480
+                        "key_code": "play_or_pause"
481
+                    }
482
+                },
483
+                {
484
+                    "from": {
485
+                        "key_code": "f9"
486
+                    },
487
+                    "to": {
488
+                        "key_code": "fastforward"
489
+                    }
490
+                },
491
+                {
492
+                    "from": {
493
+                        "key_code": "f10"
494
+                    },
495
+                    "to": {
496
+                        "key_code": "mute"
497
+                    }
498
+                },
499
+                {
500
+                    "from": {
501
+                        "key_code": "f11"
502
+                    },
503
+                    "to": {
504
+                        "key_code": "volume_decrement"
505
+                    }
506
+                },
507
+                {
508
+                    "from": {
509
+                        "key_code": "f12"
510
+                    },
511
+                    "to": {
512
+                        "key_code": "volume_increment"
513
+                    }
514
+                }
515
+            ],
516
+            "name": "no shift->paren",
517
+            "parameters": {
518
+                "delay_milliseconds_before_open_device": 1000
519
+            },
520
+            "selected": false,
521
+            "simple_modifications": [],
522
+            "virtual_hid_keyboard": {
523
+                "caps_lock_delay_milliseconds": 0,
524
+                "country_code": 0,
525
+                "keyboard_type": "ansi",
526
+                "mouse_key_xy_scale": 100
527
+            }
528
+        }
529
+    ]
530
+}
0 531
\ No newline at end of file
... ...
@@ -1,530 +1,497 @@
1 1
 {
2
-    "global": {
3
-        "check_for_updates_on_startup": true,
4
-        "show_in_menu_bar": true,
5
-        "show_profile_name_in_menu_bar": true
6
-    },
7
-    "profiles": [
8
-        {
9
-            "complex_modifications": {
10
-                "parameters": {
11
-                    "basic.simultaneous_threshold_milliseconds": 50,
12
-                    "basic.to_delayed_action_delay_milliseconds": 500,
13
-                    "basic.to_if_alone_timeout_milliseconds": 200,
14
-                    "basic.to_if_held_down_threshold_milliseconds": 500,
15
-                    "mouse_motion_to_scroll.speed": 100
16
-                },
17
-                "rules": [
18
-                    {
19
-                        "manipulators": [
20
-                            {
21
-                                "description": "Change caps_lock to command+control+option+shift.",
22
-                                "from": {
23
-                                    "key_code": "caps_lock",
24
-                                    "modifiers": {
25
-                                        "optional": [
26
-                                            "any"
27
-                                        ]
28
-                                    }
29
-                                },
30
-                                "to": [
31
-                                    {
32
-                                        "key_code": "left_option",
33
-                                        "modifiers": [
34
-                                            "left_command",
35
-                                            "left_control"
36
-                                        ]
37
-                                    }
38
-                                ],
39
-                                "type": "basic"
40
-                            }
41
-                        ]
42
-                    },
43
-                    {
44
-                        "manipulators": [
45
-                            {
46
-                                "description": "map left shift to opening parenthesis",
47
-                                "from": {
48
-                                    "key_code": "left_shift",
49
-                                    "modifiers": {
50
-                                        "optional": []
51
-                                    }
52
-                                },
53
-                                "to": [
54
-                                    {
55
-                                        "key_code": "left_shift",
56
-                                        "modifiers": []
57
-                                    }
58
-                                ],
59
-                                "to_if_alone": [
60
-                                    {
61
-                                        "key_code": "9",
62
-                                        "modifiers": [
63
-                                            "left_shift"
64
-                                        ]
65
-                                    }
66
-                                ],
67
-                                "type": "basic"
68
-                            },
69
-                            {
70
-                                "description": "map left shift to opening parenthesis",
71
-                                "from": {
72
-                                    "key_code": "left_control",
73
-                                    "modifiers": {
74
-                                        "optional": [
75
-                                            "any"
76
-                                        ]
77
-                                    }
78
-                                },
79
-                                "to": [
80
-                                    {
81
-                                        "key_code": "left_control",
82
-                                        "modifiers": []
83
-                                    }
84
-                                ],
85
-                                "to_if_alone": [
86
-                                    {
87
-                                        "key_code": "open_bracket",
88
-                                        "modifiers": [
89
-                                            "left_shift"
90
-                                        ]
91
-                                    }
92
-                                ],
93
-                                "type": "basic"
94
-                            },
95
-                            {
96
-                                "description": "map left shift to opening parenthesis",
97
-                                "from": {
98
-                                    "key_code": "right_control",
99
-                                    "modifiers": {
100
-                                        "optional": [
101
-                                            "any"
102
-                                        ]
103
-                                    }
104
-                                },
105
-                                "to": [
106
-                                    {
107
-                                        "key_code": "right_control",
108
-                                        "modifiers": []
109
-                                    }
110
-                                ],
111
-                                "to_if_alone": [
112
-                                    {
113
-                                        "key_code": "close_bracket",
114
-                                        "modifiers": [
115
-                                            "left_shift"
116
-                                        ]
117
-                                    }
118
-                                ],
119
-                                "type": "basic"
120
-                            },
121
-                            {
122
-                                "description": "map right shift to closing parenthesis",
123
-                                "from": {
124
-                                    "key_code": "right_shift",
125
-                                    "modifiers": {
126
-                                        "optional": [
127
-                                            "any"
128
-                                        ]
129
-                                    }
130
-                                },
131
-                                "to": [
132
-                                    {
133
-                                        "key_code": "right_shift",
134
-                                        "modifiers": []
135
-                                    }
136
-                                ],
137
-                                "to_if_alone": [
138
-                                    {
139
-                                        "key_code": "0",
140
-                                        "modifiers": [
141
-                                            "right_shift"
142
-                                        ]
143
-                                    }
144
-                                ],
145
-                                "type": "basic"
146
-                            }
147
-                        ]
148
-                    }
2
+  "global": {
3
+    "check_for_updates_on_startup": true,
4
+    "show_in_menu_bar": true,
5
+    "show_profile_name_in_menu_bar": true
6
+  },
7
+  "profiles": [
8
+    {
9
+      "complex_modifications": {
10
+        "parameters": {
11
+          "basic.simultaneous_threshold_milliseconds": 50,
12
+          "basic.to_delayed_action_delay_milliseconds": 500,
13
+          "basic.to_if_alone_timeout_milliseconds": 200,
14
+          "basic.to_if_held_down_threshold_milliseconds": 500,
15
+          "mouse_motion_to_scroll.speed": 100
16
+        },
17
+        "rules": [
18
+          {
19
+            "description": "Mouse Back/Forward",
20
+            "manipulators": [
21
+              {
22
+                "type": "basic",
23
+                "from": {
24
+                  "pointing_button": "button4"
25
+                },
26
+                "to": [
27
+                  {
28
+                    "key_code": "open_bracket",
29
+                    "modifiers": ["left_command"]
30
+                  }
149 31
                 ]
150
-            },
151
-            "devices": [
152
-                {
153
-                    "disable_built_in_keyboard_if_exists": false,
154
-                    "fn_function_keys": [],
155
-                    "identifiers": {
156
-                        "is_keyboard": true,
157
-                        "is_pointing_device": false,
158
-                        "product_id": 50475,
159
-                        "vendor_id": 1133
160
-                    },
161
-                    "ignore": false,
162
-                    "manipulate_caps_lock_led": false,
163
-                    "simple_modifications": []
164
-                },
165
-                {
166
-                    "disable_built_in_keyboard_if_exists": false,
167
-                    "fn_function_keys": [],
168
-                    "identifiers": {
169
-                        "is_keyboard": true,
170
-                        "is_pointing_device": false,
171
-                        "product_id": 617,
172
-                        "vendor_id": 1241
173
-                    },
174
-                    "ignore": false,
175
-                    "manipulate_caps_lock_led": false,
176
-                    "simple_modifications": []
177
-                },
178
-                {
179
-                    "disable_built_in_keyboard_if_exists": false,
180
-                    "fn_function_keys": [],
181
-                    "identifiers": {
182
-                        "is_keyboard": true,
183
-                        "is_pointing_device": false,
184
-                        "product_id": 591,
185
-                        "vendor_id": 1452
186
-                    },
187
-                    "ignore": false,
188
-                    "manipulate_caps_lock_led": true,
189
-                    "simple_modifications": []
190
-                },
191
-                {
192
-                    "disable_built_in_keyboard_if_exists": false,
193
-                    "fn_function_keys": [],
194
-                    "identifiers": {
195
-                        "is_keyboard": false,
196
-                        "is_pointing_device": true,
197
-                        "product_id": 36915,
198
-                        "vendor_id": 2522
199
-                    },
200
-                    "ignore": false,
201
-                    "manipulate_caps_lock_led": false,
202
-                    "simple_modifications": []
203
-                },
204
-                {
205
-                    "disable_built_in_keyboard_if_exists": true,
206
-                    "fn_function_keys": [],
207
-                    "identifiers": {
208
-                        "is_keyboard": true,
209
-                        "is_pointing_device": false,
210
-                        "product_id": 45849,
211
-                        "vendor_id": 1133
212
-                    },
213
-                    "ignore": false,
214
-                    "manipulate_caps_lock_led": true,
215
-                    "simple_modifications": [
216
-                        {
217
-                            "from": {
218
-                                "key_code": "left_command"
219
-                            },
220
-                            "to": {
221
-                                "key_code": "left_option"
222
-                            }
223
-                        },
224
-                        {
225
-                            "from": {
226
-                                "key_code": "left_option"
227
-                            },
228
-                            "to": {
229
-                                "key_code": "left_command"
230
-                            }
231
-                        },
232
-                        {
233
-                            "from": {
234
-                                "key_code": "right_option"
235
-                            },
236
-                            "to": {
237
-                                "key_code": "right_command"
238
-                            }
239
-                        }
240
-                    ]
241
-                },
242
-                {
243
-                    "disable_built_in_keyboard_if_exists": false,
244
-                    "fn_function_keys": [],
245
-                    "identifiers": {
246
-                        "is_keyboard": true,
247
-                        "is_pointing_device": true,
248
-                        "product_id": 8963,
249
-                        "vendor_id": 4617
250
-                    },
251
-                    "ignore": false,
252
-                    "manipulate_caps_lock_led": false,
253
-                    "simple_modifications": []
254
-                },
255
-                {
256
-                    "disable_built_in_keyboard_if_exists": false,
257
-                    "fn_function_keys": [],
258
-                    "identifiers": {
259
-                        "is_keyboard": false,
260
-                        "is_pointing_device": true,
261
-                        "product_id": 8963,
262
-                        "vendor_id": 4617
263
-                    },
264
-                    "ignore": false,
265
-                    "manipulate_caps_lock_led": false,
266
-                    "simple_modifications": []
267
-                },
268
-                {
269
-                    "disable_built_in_keyboard_if_exists": false,
270
-                    "fn_function_keys": [],
271
-                    "identifiers": {
272
-                        "is_keyboard": false,
273
-                        "is_pointing_device": true,
274
-                        "product_id": 1,
275
-                        "vendor_id": 6899
276
-                    },
277
-                    "ignore": false,
278
-                    "manipulate_caps_lock_led": false,
279
-                    "simple_modifications": []
280
-                },
281
-                {
282
-                    "disable_built_in_keyboard_if_exists": false,
283
-                    "fn_function_keys": [],
284
-                    "identifiers": {
285
-                        "is_keyboard": true,
286
-                        "is_pointing_device": false,
287
-                        "product_id": 8963,
288
-                        "vendor_id": 4617
289
-                    },
290
-                    "ignore": false,
291
-                    "manipulate_caps_lock_led": false,
292
-                    "simple_modifications": []
293
-                }
294
-            ],
295
-            "fn_function_keys": [
296
-                {
297
-                    "from": {
298
-                        "key_code": "f1"
299
-                    },
300
-                    "to": {
301
-                        "key_code": "display_brightness_decrement"
302
-                    }
303
-                },
304
-                {
305
-                    "from": {
306
-                        "key_code": "f2"
307
-                    },
308
-                    "to": {
309
-                        "key_code": "display_brightness_increment"
310
-                    }
311
-                },
312
-                {
313
-                    "from": {
314
-                        "key_code": "f3"
315
-                    },
316
-                    "to": {
317
-                        "key_code": "mission_control"
318
-                    }
319
-                },
320
-                {
321
-                    "from": {
322
-                        "key_code": "f4"
323
-                    },
324
-                    "to": {
325
-                        "key_code": "launchpad"
326
-                    }
327
-                },
328
-                {
329
-                    "from": {
330
-                        "key_code": "f5"
331
-                    },
332
-                    "to": {
333
-                        "key_code": "illumination_decrement"
334
-                    }
335
-                },
336
-                {
337
-                    "from": {
338
-                        "key_code": "f6"
339
-                    },
340
-                    "to": {
341
-                        "key_code": "illumination_increment"
342
-                    }
343
-                },
344
-                {
345
-                    "from": {
346
-                        "key_code": "f7"
347
-                    },
348
-                    "to": {
349
-                        "key_code": "rewind"
350
-                    }
351
-                },
352
-                {
353
-                    "from": {
354
-                        "key_code": "f8"
355
-                    },
356
-                    "to": {
357
-                        "key_code": "play_or_pause"
358
-                    }
359
-                },
360
-                {
361
-                    "from": {
362
-                        "key_code": "f9"
363
-                    },
364
-                    "to": {
365
-                        "key_code": "fastforward"
366
-                    }
367
-                },
368
-                {
369
-                    "from": {
370
-                        "key_code": "f10"
371
-                    },
372
-                    "to": {
373
-                        "key_code": "mute"
374
-                    }
375
-                },
376
-                {
377
-                    "from": {
378
-                        "key_code": "f11"
379
-                    },
380
-                    "to": {
381
-                        "key_code": "volume_decrement"
382
-                    }
383
-                },
384
-                {
385
-                    "from": {
386
-                        "key_code": "f12"
387
-                    },
388
-                    "to": {
389
-                        "key_code": "volume_increment"
390
-                    }
391
-                }
392
-            ],
393
-            "name": "shift->paren",
394
-            "parameters": {
395
-                "delay_milliseconds_before_open_device": 1000
396
-            },
397
-            "selected": true,
398
-            "simple_modifications": [],
399
-            "virtual_hid_keyboard": {
400
-                "caps_lock_delay_milliseconds": 0,
401
-                "country_code": 0,
402
-                "keyboard_type": "ansi",
403
-                "mouse_key_xy_scale": 100
404
-            }
32
+              },
33
+              {
34
+                "type": "basic",
35
+                "from": {
36
+                  "pointing_button": "button5"
37
+                },
38
+                "to": [
39
+                  {
40
+                    "key_code": "close_bracket",
41
+                    "modifiers": ["left_command"]
42
+                  }
43
+                ]
44
+              }
45
+            ]
46
+          },
47
+          {
48
+            "manipulators": [
49
+              {
50
+                "description": "Change caps_lock to command+control+option+shift.",
51
+                "from": {
52
+                  "key_code": "caps_lock",
53
+                  "modifiers": {
54
+                    "optional": ["any"]
55
+                  }
56
+                },
57
+                "to": [
58
+                  {
59
+                    "key_code": "left_option",
60
+                    "modifiers": ["left_command", "left_control"]
61
+                  }
62
+                ],
63
+                "type": "basic"
64
+              }
65
+            ]
66
+          },
67
+          {
68
+            "manipulators": [
69
+              {
70
+                "description": "map left shift to opening parenthesis",
71
+                "from": {
72
+                  "key_code": "left_shift",
73
+                  "modifiers": {
74
+                    "optional": []
75
+                  }
76
+                },
77
+                "to": [
78
+                  {
79
+                    "key_code": "left_shift",
80
+                    "modifiers": []
81
+                  }
82
+                ],
83
+                "to_if_alone": [
84
+                  {
85
+                    "key_code": "9",
86
+                    "modifiers": ["left_shift"]
87
+                  }
88
+                ],
89
+                "type": "basic"
90
+              },
91
+              {
92
+                "description": "map right shift to closing parenthesis",
93
+                "from": {
94
+                  "key_code": "right_shift",
95
+                  "modifiers": {
96
+                    "optional": ["any"]
97
+                  }
98
+                },
99
+                "to": [
100
+                  {
101
+                    "key_code": "right_shift",
102
+                    "modifiers": []
103
+                  }
104
+                ],
105
+                "to_if_alone": [
106
+                  {
107
+                    "key_code": "0",
108
+                    "modifiers": ["right_shift"]
109
+                  }
110
+                ],
111
+                "type": "basic"
112
+              }
113
+            ]
114
+          }
115
+        ]
116
+      },
117
+      "devices": [
118
+        {
119
+          "disable_built_in_keyboard_if_exists": false,
120
+          "fn_function_keys": [],
121
+          "identifiers": {
122
+            "is_keyboard": true,
123
+            "is_pointing_device": false,
124
+            "product_id": 50475,
125
+            "vendor_id": 1133
126
+          },
127
+          "ignore": false,
128
+          "manipulate_caps_lock_led": false,
129
+          "simple_modifications": []
405 130
         },
406 131
         {
407
-            "complex_modifications": {
408
-                "parameters": {
409
-                    "basic.simultaneous_threshold_milliseconds": 50,
410
-                    "basic.to_delayed_action_delay_milliseconds": 500,
411
-                    "basic.to_if_alone_timeout_milliseconds": 1000,
412
-                    "basic.to_if_held_down_threshold_milliseconds": 500,
413
-                    "mouse_motion_to_scroll.speed": 100
414
-                },
415
-                "rules": []
132
+          "disable_built_in_keyboard_if_exists": false,
133
+          "fn_function_keys": [],
134
+          "identifiers": {
135
+            "is_keyboard": true,
136
+            "is_pointing_device": false,
137
+            "product_id": 617,
138
+            "vendor_id": 1241
139
+          },
140
+          "ignore": false,
141
+          "manipulate_caps_lock_led": false,
142
+          "simple_modifications": []
143
+        },
144
+        {
145
+          "disable_built_in_keyboard_if_exists": false,
146
+          "fn_function_keys": [],
147
+          "identifiers": {
148
+            "is_keyboard": true,
149
+            "is_pointing_device": false,
150
+            "product_id": 591,
151
+            "vendor_id": 1452
152
+          },
153
+          "ignore": false,
154
+          "manipulate_caps_lock_led": true,
155
+          "simple_modifications": []
156
+        },
157
+        {
158
+          "disable_built_in_keyboard_if_exists": false,
159
+          "fn_function_keys": [],
160
+          "identifiers": {
161
+            "is_keyboard": false,
162
+            "is_pointing_device": true,
163
+            "product_id": 36915,
164
+            "vendor_id": 2522
165
+          },
166
+          "ignore": false,
167
+          "manipulate_caps_lock_led": false,
168
+          "simple_modifications": []
169
+        },
170
+        {
171
+          "disable_built_in_keyboard_if_exists": true,
172
+          "fn_function_keys": [],
173
+          "identifiers": {
174
+            "is_keyboard": true,
175
+            "is_pointing_device": false,
176
+            "product_id": 45849,
177
+            "vendor_id": 1133
178
+          },
179
+          "ignore": false,
180
+          "manipulate_caps_lock_led": true,
181
+          "simple_modifications": [
182
+            {
183
+              "from": {
184
+                "key_code": "left_command"
185
+              },
186
+              "to": {
187
+                "key_code": "left_option"
188
+              }
416 189
             },
417
-            "devices": [],
418
-            "fn_function_keys": [
419
-                {
420
-                    "from": {
421
-                        "key_code": "f1"
422
-                    },
423
-                    "to": {
424
-                        "key_code": "display_brightness_decrement"
425
-                    }
426
-                },
427
-                {
428
-                    "from": {
429
-                        "key_code": "f2"
430
-                    },
431
-                    "to": {
432
-                        "key_code": "display_brightness_increment"
433
-                    }
434
-                },
435
-                {
436
-                    "from": {
437
-                        "key_code": "f3"
438
-                    },
439
-                    "to": {
440
-                        "key_code": "mission_control"
441
-                    }
442
-                },
443
-                {
444
-                    "from": {
445
-                        "key_code": "f4"
446
-                    },
447
-                    "to": {
448
-                        "key_code": "launchpad"
449
-                    }
450
-                },
451
-                {
452
-                    "from": {
453
-                        "key_code": "f5"
454
-                    },
455
-                    "to": {
456
-                        "key_code": "illumination_decrement"
457
-                    }
458
-                },
459
-                {
460
-                    "from": {
461
-                        "key_code": "f6"
462
-                    },
463
-                    "to": {
464
-                        "key_code": "illumination_increment"
465
-                    }
466
-                },
467
-                {
468
-                    "from": {
469
-                        "key_code": "f7"
470
-                    },
471
-                    "to": {
472
-                        "key_code": "rewind"
473
-                    }
474
-                },
475
-                {
476
-                    "from": {
477
-                        "key_code": "f8"
478
-                    },
479
-                    "to": {
480
-                        "key_code": "play_or_pause"
481
-                    }
482
-                },
483
-                {
484
-                    "from": {
485
-                        "key_code": "f9"
486
-                    },
487
-                    "to": {
488
-                        "key_code": "fastforward"
489
-                    }
490
-                },
491
-                {
492
-                    "from": {
493
-                        "key_code": "f10"
494
-                    },
495
-                    "to": {
496
-                        "key_code": "mute"
497
-                    }
498
-                },
499
-                {
500
-                    "from": {
501
-                        "key_code": "f11"
502
-                    },
503
-                    "to": {
504
-                        "key_code": "volume_decrement"
505
-                    }
506
-                },
507
-                {
508
-                    "from": {
509
-                        "key_code": "f12"
510
-                    },
511
-                    "to": {
512
-                        "key_code": "volume_increment"
513
-                    }
514
-                }
515
-            ],
516
-            "name": "no shift->paren",
517
-            "parameters": {
518
-                "delay_milliseconds_before_open_device": 1000
190
+            {
191
+              "from": {
192
+                "key_code": "left_option"
193
+              },
194
+              "to": {
195
+                "key_code": "left_command"
196
+              }
519 197
             },
520
-            "selected": false,
521
-            "simple_modifications": [],
522
-            "virtual_hid_keyboard": {
523
-                "caps_lock_delay_milliseconds": 0,
524
-                "country_code": 0,
525
-                "keyboard_type": "ansi",
526
-                "mouse_key_xy_scale": 100
198
+            {
199
+              "from": {
200
+                "key_code": "right_option"
201
+              },
202
+              "to": {
203
+                "key_code": "right_command"
204
+              }
527 205
             }
206
+          ]
207
+        },
208
+        {
209
+          "disable_built_in_keyboard_if_exists": false,
210
+          "fn_function_keys": [],
211
+          "identifiers": {
212
+            "is_keyboard": true,
213
+            "is_pointing_device": true,
214
+            "product_id": 8963,
215
+            "vendor_id": 4617
216
+          },
217
+          "ignore": false,
218
+          "manipulate_caps_lock_led": false,
219
+          "simple_modifications": []
220
+        },
221
+        {
222
+          "disable_built_in_keyboard_if_exists": false,
223
+          "fn_function_keys": [],
224
+          "identifiers": {
225
+            "is_keyboard": false,
226
+            "is_pointing_device": true,
227
+            "product_id": 8963,
228
+            "vendor_id": 4617
229
+          },
230
+          "ignore": false,
231
+          "manipulate_caps_lock_led": false,
232
+          "simple_modifications": []
233
+        },
234
+        {
235
+          "disable_built_in_keyboard_if_exists": false,
236
+          "fn_function_keys": [],
237
+          "identifiers": {
238
+            "is_keyboard": false,
239
+            "is_pointing_device": true,
240
+            "product_id": 1,
241
+            "vendor_id": 6899
242
+          },
243
+          "ignore": false,
244
+          "manipulate_caps_lock_led": false,
245
+          "simple_modifications": []
246
+        },
247
+        {
248
+          "disable_built_in_keyboard_if_exists": false,
249
+          "fn_function_keys": [],
250
+          "identifiers": {
251
+            "is_keyboard": true,
252
+            "is_pointing_device": false,
253
+            "product_id": 8963,
254
+            "vendor_id": 4617
255
+          },
256
+          "ignore": false,
257
+          "manipulate_caps_lock_led": false,
258
+          "simple_modifications": []
259
+        }
260
+      ],
261
+      "fn_function_keys": [
262
+        {
263
+          "from": {
264
+            "key_code": "f1"
265
+          },
266
+          "to": {
267
+            "key_code": "display_brightness_decrement"
268
+          }
269
+        },
270
+        {
271
+          "from": {
272
+            "key_code": "f2"
273
+          },
274
+          "to": {
275
+            "key_code": "display_brightness_increment"
276
+          }
277
+        },
278
+        {
279
+          "from": {
280
+            "key_code": "f3"
281
+          },
282
+          "to": {
283
+            "key_code": "mission_control"
284
+          }
285
+        },
286
+        {
287
+          "from": {
288
+            "key_code": "f4"
289
+          },
290
+          "to": {
291
+            "key_code": "launchpad"
292
+          }
293
+        },
294
+        {
295
+          "from": {
296
+            "key_code": "f5"
297
+          },
298
+          "to": {
299
+            "key_code": "illumination_decrement"
300
+          }
301
+        },
302
+        {
303
+          "from": {
304
+            "key_code": "f6"
305
+          },
306
+          "to": {
307
+            "key_code": "illumination_increment"
308
+          }
309
+        },
310
+        {
311
+          "from": {
312
+            "key_code": "f7"
313
+          },
314
+          "to": {
315
+            "key_code": "rewind"
316
+          }
317
+        },
318
+        {
319
+          "from": {
320
+            "key_code": "f8"
321
+          },
322
+          "to": {
323
+            "key_code": "play_or_pause"
324
+          }
325
+        },
326
+        {
327
+          "from": {
328
+            "key_code": "f9"
329
+          },
330
+          "to": {
331
+            "key_code": "fastforward"
332
+          }
333
+        },
334
+        {
335
+          "from": {
336
+            "key_code": "f10"
337
+          },
338
+          "to": {
339
+            "key_code": "mute"
340
+          }
341
+        },
342
+        {
343
+          "from": {
344
+            "key_code": "f11"
345
+          },
346
+          "to": {
347
+            "key_code": "volume_decrement"
348
+          }
349
+        },
350
+        {
351
+          "from": {
352
+            "key_code": "f12"
353
+          },
354
+          "to": {
355
+            "key_code": "volume_increment"
356
+          }
357
+        }
358
+      ],
359
+      "name": "shift->paren",
360
+      "parameters": {
361
+        "delay_milliseconds_before_open_device": 1000
362
+      },
363
+      "selected": true,
364
+      "simple_modifications": [
365
+      ],
366
+      "virtual_hid_keyboard": {
367
+        "caps_lock_delay_milliseconds": 0,
368
+        "country_code": 0,
369
+        "keyboard_type": "ansi",
370
+        "mouse_key_xy_scale": 100
371
+      }
372
+    },
373
+    {
374
+      "complex_modifications": {
375
+        "parameters": {
376
+          "basic.simultaneous_threshold_milliseconds": 50,
377
+          "basic.to_delayed_action_delay_milliseconds": 500,
378
+          "basic.to_if_alone_timeout_milliseconds": 1000,
379
+          "basic.to_if_held_down_threshold_milliseconds": 500,
380
+          "mouse_motion_to_scroll.speed": 100
381
+        },
382
+        "rules": []
383
+      },
384
+      "devices": [],
385
+      "fn_function_keys": [
386
+        {
387
+          "from": {
388
+            "key_code": "f1"
389
+          },
390
+          "to": {
391
+            "key_code": "display_brightness_decrement"
392
+          }
393
+        },
394
+        {
395
+          "from": {
396
+            "key_code": "f2"
397
+          },
398
+          "to": {
399
+            "key_code": "display_brightness_increment"
400
+          }
401
+        },
402
+        {
403
+          "from": {
404
+            "key_code": "f3"
405
+          },
406
+          "to": {
407
+            "key_code": "mission_control"
408
+          }
409
+        },
410
+        {
411
+          "from": {
412
+            "key_code": "f4"
413
+          },
414
+          "to": {
415
+            "key_code": "launchpad"
416
+          }
417
+        },
418
+        {
419
+          "from": {
420
+            "key_code": "f5"
421
+          },
422
+          "to": {
423
+            "key_code": "illumination_decrement"
424
+          }
425
+        },
426
+        {
427
+          "from": {
428
+            "key_code": "f6"
429
+          },
430
+          "to": {
431
+            "key_code": "illumination_increment"
432
+          }
433
+        },
434
+        {
435
+          "from": {
436
+            "key_code": "f7"
437
+          },
438
+          "to": {
439
+            "key_code": "rewind"
440
+          }
441
+        },
442
+        {
443
+          "from": {
444
+            "key_code": "f8"
445
+          },
446
+          "to": {
447
+            "key_code": "play_or_pause"
448
+          }
449
+        },
450
+        {
451
+          "from": {
452
+            "key_code": "f9"
453
+          },
454
+          "to": {
455
+            "key_code": "fastforward"
456
+          }
457
+        },
458
+        {
459
+          "from": {
460
+            "key_code": "f10"
461
+          },
462
+          "to": {
463
+            "key_code": "mute"
464
+          }
465
+        },
466
+        {
467
+          "from": {
468
+            "key_code": "f11"
469
+          },
470
+          "to": {
471
+            "key_code": "volume_decrement"
472
+          }
473
+        },
474
+        {
475
+          "from": {
476
+            "key_code": "f12"
477
+          },
478
+          "to": {
479
+            "key_code": "volume_increment"
480
+          }
528 481
         }
529
-    ]
530
-}
531 482
\ No newline at end of file
483
+      ],
484
+      "name": "no shift->paren",
485
+      "parameters": {
486
+        "delay_milliseconds_before_open_device": 1000
487
+      },
488
+      "selected": false,
489
+      "simple_modifications": [],
490
+      "virtual_hid_keyboard": {
491
+        "caps_lock_delay_milliseconds": 0,
492
+        "country_code": 0,
493
+        "keyboard_type": "ansi",
494
+        "mouse_key_xy_scale": 100
495
+      }
496
+    }
497
+  ]
498
+}
... ...
@@ -22,7 +22,7 @@
22 22
                        (not (string= line ".")))
23 23
             do
24 24
                (princ line s)
25
-               (terpri s)))))
25
+               (terpri s))))
26 26
 
27 27
 (uiop:run-program "git add .gitignore"
28 28
                   :force-shell t
29 29
new file mode 100755
... ...
@@ -0,0 +1,7 @@
1
+#!/usr/bin/env zsh
2
+emacsclient -n -e "
3
+(let ((default-directory \"$PWD\"))
4
+  (magit)
5
+  (delete-other-windows)
6
+  (select-frame-set-input-focus (selected-frame)))
7
+"
... ...
@@ -49,11 +49,24 @@ linkify_tree() {
49 49
   cd "$1"
50 50
   find . -type f | {
51 51
     while read -r fn; do
52
+      target="$(file_to_hashed_dir "$fn")"
52 53
       if ! [[ -L "$fn" ]]; then
53
-        target="$(file_to_hashed_dir "$fn")"
54
-        cp "$fn" "$target"
55
-        rm "$fn"
56
-        ln -sv "$target" "$fn"
54
+        if ! [[ -f "$target" ]]; then
55
+          if [[ -e "$target" ]]; then
56
+            echo $target is not a normal file
57
+            ls -l "$target"
58
+            exit 1
59
+          fi
60
+          mv "$fn" "$target"
61
+        else
62
+          mv "$fn" "$fn".old
63
+        fi
64
+        ln -v "$target" "$fn"
65
+        if [[ -f "$fn".old ]]; then
66
+          rm "$fn".old
67
+        fi
68
+      else
69
+        touch $target
57 70
       fi
58 71
       echo
59 72
     done
... ...
@@ -42,4 +42,4 @@ elif args.list:
42 42
     max_itm = max(len(x) for x in files)
43 43
     for x in range(len(files)/3 + 1):
44 44
         items = files[x*3:(x+1)*3]
45
-        print ' '.join(item.rjust(max_itm+3) for item in items)
45
+        print ' '.join(item.ljust(max_itm+3) for item in items)
46 46
similarity index 94%
47 47
rename from .tmux.conf
48 48
rename to tmux.conf
... ...
@@ -1,7 +1,3 @@
1
-new -s catchnet
2
-set -g default-terminal "screen-noit"
3
-setw -g mode-keys vi
4
-
5 1
 # smart pane switching with awareness of vim splits
6 2
 bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq -e emacs -e vim && tmux send-keys C-h) || tmux select-pane -L"
7 3
 bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq -e emacs -e vim && tmux send-keys C-j) || tmux select-pane -D"
... ...
@@ -32,5 +28,3 @@ set -g message-style fg=colour16,bg=colour221,bold
32 28
 set -g status-left '#[fg=colour235,bg=colour252,bold]  #S #[fg=colour252,bg=colour238,nobold]#[fg=colour245,bg=colour238,bold] #(whoami) #[fg=colour238,bg=colour234,nobold]'
33 29
 set -g window-status-format "#[fg=white,bg=colour234]#I #W"
34 30
 set -g window-status-current-format "#[fg=colour234,bg=colour39] #[fg=colour25,bg=colour39,noreverse,bold] #I  #W #[fg=colour39,bg=colour234,nobold]"
35
-
36
-set -sg escape-time 0
37 31
new file mode 100755
... ...
@@ -0,0 +1,65 @@
1
+#!/home/edwlan/bin/sbcl --script
2
+
3
+(load "~/quicklisp/setup.lisp")
4
+(ql:quickload '(:lquery :fwoar-lisputils :alexandria :net.didierverna.clon))
5
+
6
+(eval-when (:compile-toplevel :load-toplevel :execute)
7
+  (require :uiop))
8
+
9
+(defpackage :fwoar.ct->sexp
10
+  (:use :cl)
11
+  (:local-nicknames (:clon :net.didierverna.clon))
12
+  (:export ))
13
+(in-package :fwoar.ct->sexp)
14
+
15
+(defparameter *args*
16
+  (uiop:command-line-arguments))
17
+
18
+(defun extract-refs (work root)
19
+  (lquery:$
20
+    (inline root)
21
+    "p[title]"
22
+    (combine (attr "title")
23
+             (text))
24
+    (map-apply (lambda (ref text)
25
+                 (list 'ref work
26
+                       (serapeum:string-join (fwoar.string-utils:split " " (elt (fwoar.string-utils:split "," ref) 1)))
27
+                       text)))))
28
+
29
+(defun serialize-refs (out-fn refs)
30
+  (alexandria:with-output-to-file (s out-fn :if-exists :append :if-does-not-exist :create)
31
+    (let ((*print-case* :downcase))
32
+      (map nil
33
+           (lambda (ref)
34
+             (prin1 ref s)
35
+             (fresh-line s))
36
+           refs))))
37
+
38
+(defun translate (in out)
39
+  (let ((root (plump:parse in))
40
+        (out-path (parse-namestring out)))
41
+    (serialize-refs out
42
+                    (extract-refs (alexandria:make-keyword
43
+                                   (string-upcase (pathname-name out-path)))
44
+                                  root))))
45
+
46
+(defparameter *synopsis*
47
+  (net.didierverna.clon:defsynopsis (:postfix "OUT FILES...")))
48
+
49
+(defun main ()
50
+  (net.didierverna.clon:make-context :synopsis *synopsis*)
51
+  (let ((*package* (find-package :fwoar.ct->sexp)))
52
+    (destructuring-bind (out . files) (net.didierverna.clon:remainder)
53
+      (format *error-output*
54
+              "OUT: ~s~%FILES: ~s~%"
55
+              out files)
56
+      (map nil
57
+           (lambda (file)
58
+             (format *error-output* "PROCESSING FILE: ~s~%" file)
59
+             (translate (parse-namestring file)
60
+                        out))
61
+           files))))
62
+
63
+(net.didierverna.clon:dump (merge-pathnames "bin/ct-sexp"
64
+                                            (user-homedir-pathname))
65
+                           main)
... ...
@@ -5,6 +5,11 @@ GIT_DEBUG=0
5 5
 GIT_CMD="`which -p git 2>/dev/null`"
6 6
 GTI_CMD="`which -p gti 2>/dev/null`"
7 7
 
8
+GIT_DIR=("$HOME"/git*repos)
9
+if ! [[ -d "$HOME/git*_repos" ]]; then
10
+  mkdir -p "$HOME"/git_repos
11
+fi
12
+
8 13
 git-bump() {
9 14
   git commit -m "${SITE_PREFIX:-}(bump)" --allow-empty
10 15
 }
... ...
@@ -137,7 +142,7 @@ git-remote() {
137 142
   base_cmd=("$GIT_CMD" remote)
138 143
   opts=()
139 144
   args=()
140
-  for x in "$@"; do 
145
+  for x in "$@"; do
141 146
     if [[ "${x[1]}" == "-" ]]; then
142 147
       opts=("${opts[@]}" "$x")
143 148
     else
... ...
@@ -149,9 +154,9 @@ git-remote() {
149 154
        b=${args[2]};
150 155
        shift 2 args;
151 156
        args=("$a" "${args[@]}")
152
-       if (( $#opts > 0 )); then 
157
+       if (( $#opts > 0 )); then
153 158
          "${base_cmd[@]}" "$b" "${opts[@]}" "${args[@]}"
154
-       else 
159
+       else
155 160
          "${base_cmd[@]}" "$b" "${args[@]}"
156 161
        fi
157 162
      } else {
... ...
@@ -1,7 +1,7 @@
1 1
 # Requires pandoc
2 2
 
3 3
 2man() {
4
-  input="$2"
4
+  local input="$2"
5 5
   if [[ "$input" == "" ]]; then
6 6
     input="-"
7 7
   fi
... ...
@@ -11,6 +11,9 @@
11 11
 alias html2man='2man html'
12 12
 alias md2man='2man markdown'
13 13
 alias latex2man='2man latex'
14
+vmd() {
15
+  md2man $1 | man- | less
16
+}
14 17
 
15 18
 _pandoc_view() {
16 19
   2man $1 $2 | man-
... ...
@@ -39,7 +39,7 @@ zstyle :compinstall filename '/Users/elangley/.zsh.d/99-completion.zsh'
39 39
 
40 40
 
41 41
 source $HOME/.zsh.d/nix-zsh-completions/nix.plugin.zsh
42
-fpath=($HOME/.zsh.d/completion $fpath $HOME/.zsh.d/nix-zsh-completions)
42
+fpath=($HOME/.zsh.d/completion $fpath $HOME/.zsh.d/zsh-completions/src $HOME/.zsh.d/nix-zsh-completions)
43 43
 
44 44
 autoload -Uz compinit
45 45
 
... ...
@@ -82,8 +82,10 @@ function get_forge_function() {
82 82
 
83 83
 function get_forge_root() {
84 84
   local forge="$1"
85
-  if command -v "${forge}_root" &>>-; then
86
-    "${forge}_root"
85
+  # echo "$@" >&2
86
+  shift
87
+  if command -v "${forge}_root" &>>/dev/null; then
88
+    "${forge}_root" "$@"
87 89
   else
88 90
     echo "$GIT_3DP_DIR"/
89 91
   fi
... ...
@@ -93,17 +95,31 @@ alias_forge bb github
93 95
 alias_forge gh github
94 96
 alias_forge gl gitlab
95 97
 
98
+github_root() {
99
+  local proj_dir="$HOME"/git_repos/github/"$1"/
100
+  if ! [[ -d "$proj_dir" ]]; then
101
+    mkdir -p "$proj_dir"
102
+  fi
103
+
104
+  echo "$proj_dir"
105
+}
106
+
96 107
 function git-get() {
97 108
   local git_user
98 109
   local package
99
-  
110
+
100 111
   forge=${1?Need a forge spec}
101 112
 
102
-  shift 
113
+  shift
103 114
 
104 115
   if [[ $# == 1 ]]; then
105
-    git_user=
106
-    package=$1
116
+    if [[ "$1" == */* ]]; then
117
+      git_user="${1%%/*}"
118
+      package="${1#*/}"
119
+    else
120
+      git_user=
121
+      package=$1
122
+    fi
107 123
   elif (( $# == 2 )); then
108 124
     git_user=$1
109 125
     package=$2
... ...
@@ -117,12 +133,12 @@ function git-get() {
117 133
 
118 134
   shift
119 135
 
120
-  local target="$(get_forge_root "$forge")"
136
+  # echo "git user? $git_user package? $package" >&2
137
+  local target="$(get_forge_root "$forge" "$git_user")"
121 138
   cd "$target"
122 139
 
123 140
   local forge_url_function="${$(get_forge_function "$forge"):?forge not recognized}"
124 141
   git-forge-clone "$forge_url_function"
125
-  
142
+
126 143
   cd "$(basename "$package")"
127 144
 }
128
-
... ...
@@ -1,7 +1,6 @@
1 1
 savedir() {
2
-    cmd="hash -d \"$1\"=\"$PWD/${(j</>)*}\""
2
+    cmd="hash -d \"$1\"=\"$PWD\""
3 3
     eval $cmd
4
-    truncfile 50 $HOME/.gtaliases
5 4
     echo $cmd >> $HOME/.gtaliases
6 5
 }
7 6
 source "$HOME/.gtaliases"