-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocs.json
More file actions
558 lines (516 loc) · 21.2 KB
/
Copy pathdocs.json
File metadata and controls
558 lines (516 loc) · 21.2 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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
[
{
"Constant" : [
],
"submodules" : [
],
"Function" : [
],
"Variable" : [
{
"doc" : "Logger object used within the Spoon.",
"stripped_doc" : [
"Logger object used within the Spoon."
],
"def" : "URLPicker.logger",
"desc" : "Logger object used within the Spoon.",
"notes" : [
],
"signature" : "URLPicker.logger",
"type" : "Variable",
"returns" : [
],
"name" : "logger",
"parameters" : [
]
},
{
"doc" : "Browser bundle IDs pinned to the top of the picker, in display order. Only\ninstalled handlers for the URL scheme are shown. Default: `{}`.\n\nExample: `{ \"org.mozilla.firefox\", \"com.google.Chrome\" }`.",
"stripped_doc" : [
"Browser bundle IDs pinned to the top of the picker, in display order. Only",
"installed handlers for the URL scheme are shown. Default: `{}`.",
"",
"Example: `{ \"org.mozilla.firefox\", \"com.google.Chrome\" }`."
],
"def" : "URLPicker.pinnedBrowsers",
"desc" : "Browser bundle IDs pinned to the top of the picker, in display order. Only",
"notes" : [
],
"signature" : "URLPicker.pinnedBrowsers",
"type" : "Variable",
"returns" : [
],
"name" : "pinnedBrowsers",
"parameters" : [
]
},
{
"doc" : "Configuration table used by `start()` and `configure()`.\n\nFields:\n * autoSetDefaultHandlers - If true, `start()` sets Hammerspoon as the default\n handler for `http` and `https` links. Default: true.\n * restoreDefaultHandlersOnStop - If true, `stop()` restores the previous\n default handlers captured by `enable()`. Default: false.\n * maxCandidates - Maximum number of browser candidates shown in the picker.\n Default: 24.",
"stripped_doc" : [
"Configuration table used by `start()` and `configure()`.",
"",
"Fields:",
" * autoSetDefaultHandlers - If true, `start()` sets Hammerspoon as the default",
" handler for `http` and `https` links. Default: true.",
" * restoreDefaultHandlersOnStop - If true, `stop()` restores the previous",
" default handlers captured by `enable()`. Default: false.",
" * maxCandidates - Maximum number of browser candidates shown in the picker.",
" Default: 24."
],
"def" : "URLPicker.config",
"desc" : "Configuration table used by `start()` and `configure()`.",
"notes" : [
],
"signature" : "URLPicker.config",
"type" : "Variable",
"returns" : [
],
"name" : "config",
"parameters" : [
]
}
],
"stripped_doc" : [
],
"Deprecated" : [
],
"type" : "Module",
"desc" : "Intercept `http`\/`https` URL events and choose which browser opens each link.",
"Constructor" : [
],
"doc" : "Intercept `http`\/`https` URL events and choose which browser opens each link.\n\nURLPicker registers Hammerspoon as the default handler for web links, then\ndisplays a compact browser picker near the mouse cursor whenever a URL is\nopened. Choose with the mouse, arrow keys, Return, or dismiss with Escape.\n\nUsage:\n```lua\nhs.loadSpoon(\"URLPicker\")\nspoon.URLPicker:start()\n```\n\nOptional configuration:\n```lua\nspoon.URLPicker.pinnedBrowsers = { \"org.mozilla.firefox\" }\nspoon.URLPicker:start({\n autoSetDefaultHandlers = true,\n restoreDefaultHandlersOnStop = false,\n maxCandidates = 24,\n})\n```\n\nDownload: https:\/\/github.com\/343dev\/hammerspoon",
"Method" : [
{
"doc" : "Initializes the URLPicker Spoon. Called automatically by `hs.loadSpoon()`.\n\nThis method does not register URL handlers, change default browser settings,\nstart event taps, or show UI. Call `start()` to enable URL interception.\n\nParameters:\n * None\n\nReturns:\n * The URLPicker object",
"stripped_doc" : [
"Initializes the URLPicker Spoon. Called automatically by `hs.loadSpoon()`.",
"",
"This method does not register URL handlers, change default browser settings,",
"start event taps, or show UI. Call `start()` to enable URL interception.",
""
],
"def" : "URLPicker:init()",
"desc" : "Initializes the URLPicker Spoon. Called automatically by `hs.loadSpoon()`.",
"notes" : [
],
"signature" : "URLPicker:init()",
"type" : "Method",
"returns" : [
" * The URLPicker object"
],
"name" : "init",
"parameters" : [
" * None",
""
]
},
{
"doc" : "Applies configuration values without starting the Spoon.\n\nParameters:\n * config - A table containing any of the following optional keys:\n * autoSetDefaultHandlers - A boolean controlling whether `start()` calls\n `enable()` automatically.\n * restoreDefaultHandlersOnStop - A boolean controlling whether `stop()`\n restores default URL handlers captured by `enable()`.\n * maxCandidates - A number limiting browser candidates shown in the picker.\n * pinnedBrowsers - An array of browser bundle IDs pinned to the top of the\n picker, for example `{ \"org.mozilla.firefox\", \"com.google.Chrome\" }`.\n\nReturns:\n * The URLPicker object",
"stripped_doc" : [
"Applies configuration values without starting the Spoon.",
""
],
"def" : "URLPicker:configure(config)",
"desc" : "Applies configuration values without starting the Spoon.",
"notes" : [
],
"signature" : "URLPicker:configure(config)",
"type" : "Method",
"returns" : [
" * The URLPicker object"
],
"name" : "configure",
"parameters" : [
" * config - A table containing any of the following optional keys:",
" * autoSetDefaultHandlers - A boolean controlling whether `start()` calls",
" `enable()` automatically.",
" * restoreDefaultHandlersOnStop - A boolean controlling whether `stop()`",
" restores default URL handlers captured by `enable()`.",
" * maxCandidates - A number limiting browser candidates shown in the picker.",
" * pinnedBrowsers - An array of browser bundle IDs pinned to the top of the",
" picker, for example `{ \"org.mozilla.firefox\", \"com.google.Chrome\" }`.",
""
]
},
{
"doc" : "Shows the browser picker for a URL.\n\nParameters:\n * url - A string containing an `http` or `https` URL.\n\nReturns:\n * A boolean, true if the picker was shown, otherwise false",
"stripped_doc" : [
"Shows the browser picker for a URL.",
""
],
"def" : "URLPicker:show(url)",
"desc" : "Shows the browser picker for a URL.",
"notes" : [
],
"signature" : "URLPicker:show(url)",
"type" : "Method",
"returns" : [
" * A boolean, true if the picker was shown, otherwise false"
],
"name" : "show",
"parameters" : [
" * url - A string containing an `http` or `https` URL.",
""
]
},
{
"doc" : "Sets Hammerspoon as the default handler for `http` and `https` URLs.\n\nThe previous handlers are remembered so they can be restored later by\n`disable()` or by `stop()` when `restoreDefaultHandlersOnStop` is true.\n\nParameters:\n * None\n\nReturns:\n * A boolean, true after both default-handler change requests are submitted",
"stripped_doc" : [
"Sets Hammerspoon as the default handler for `http` and `https` URLs.",
"",
"The previous handlers are remembered so they can be restored later by",
"`disable()` or by `stop()` when `restoreDefaultHandlersOnStop` is true.",
""
],
"def" : "URLPicker:enable()",
"desc" : "Sets Hammerspoon as the default handler for `http` and `https` URLs.",
"notes" : [
],
"signature" : "URLPicker:enable()",
"type" : "Method",
"returns" : [
" * A boolean, true after both default-handler change requests are submitted"
],
"name" : "enable",
"parameters" : [
" * None",
""
]
},
{
"doc" : "Restores the default `http` and `https` URL handlers captured by `enable()`.\n\nParameters:\n * None\n\nReturns:\n * A boolean, true after the restore attempt completes",
"stripped_doc" : [
"Restores the default `http` and `https` URL handlers captured by `enable()`.",
""
],
"def" : "URLPicker:disable()",
"desc" : "Restores the default `http` and `https` URL handlers captured by `enable()`.",
"notes" : [
],
"signature" : "URLPicker:disable()",
"type" : "Method",
"returns" : [
" * A boolean, true after the restore attempt completes"
],
"name" : "disable",
"parameters" : [
" * None",
""
]
},
{
"doc" : "Closes the browser picker UI and stops temporary event taps.\n\nParameters:\n * None\n\nReturns:\n * The URLPicker object",
"stripped_doc" : [
"Closes the browser picker UI and stops temporary event taps.",
""
],
"def" : "URLPicker:cleanup()",
"desc" : "Closes the browser picker UI and stops temporary event taps.",
"notes" : [
],
"signature" : "URLPicker:cleanup()",
"type" : "Method",
"returns" : [
" * The URLPicker object"
],
"name" : "cleanup",
"parameters" : [
" * None",
""
]
},
{
"doc" : "Starts URL interception.\n\nParameters:\n * config - An optional configuration table accepted by `configure()`.\n\nReturns:\n * The URLPicker object",
"stripped_doc" : [
"Starts URL interception.",
""
],
"def" : "URLPicker:start([config])",
"desc" : "Starts URL interception.",
"notes" : [
],
"signature" : "URLPicker:start([config])",
"type" : "Method",
"returns" : [
" * The URLPicker object"
],
"name" : "start",
"parameters" : [
" * config - An optional configuration table accepted by `configure()`.",
""
]
},
{
"doc" : "Stops URL interception and closes any visible picker UI.\n\nParameters:\n * None\n\nReturns:\n * The URLPicker object",
"stripped_doc" : [
"Stops URL interception and closes any visible picker UI.",
""
],
"def" : "URLPicker:stop()",
"desc" : "Stops URL interception and closes any visible picker UI.",
"notes" : [
],
"signature" : "URLPicker:stop()",
"type" : "Method",
"returns" : [
" * The URLPicker object"
],
"name" : "stop",
"parameters" : [
" * None",
""
]
}
],
"Command" : [
],
"Field" : [
],
"items" : [
{
"doc" : "Configuration table used by `start()` and `configure()`.\n\nFields:\n * autoSetDefaultHandlers - If true, `start()` sets Hammerspoon as the default\n handler for `http` and `https` links. Default: true.\n * restoreDefaultHandlersOnStop - If true, `stop()` restores the previous\n default handlers captured by `enable()`. Default: false.\n * maxCandidates - Maximum number of browser candidates shown in the picker.\n Default: 24.",
"stripped_doc" : [
"Configuration table used by `start()` and `configure()`.",
"",
"Fields:",
" * autoSetDefaultHandlers - If true, `start()` sets Hammerspoon as the default",
" handler for `http` and `https` links. Default: true.",
" * restoreDefaultHandlersOnStop - If true, `stop()` restores the previous",
" default handlers captured by `enable()`. Default: false.",
" * maxCandidates - Maximum number of browser candidates shown in the picker.",
" Default: 24."
],
"def" : "URLPicker.config",
"desc" : "Configuration table used by `start()` and `configure()`.",
"notes" : [
],
"signature" : "URLPicker.config",
"type" : "Variable",
"returns" : [
],
"name" : "config",
"parameters" : [
]
},
{
"doc" : "Logger object used within the Spoon.",
"stripped_doc" : [
"Logger object used within the Spoon."
],
"def" : "URLPicker.logger",
"desc" : "Logger object used within the Spoon.",
"notes" : [
],
"signature" : "URLPicker.logger",
"type" : "Variable",
"returns" : [
],
"name" : "logger",
"parameters" : [
]
},
{
"doc" : "Browser bundle IDs pinned to the top of the picker, in display order. Only\ninstalled handlers for the URL scheme are shown. Default: `{}`.\n\nExample: `{ \"org.mozilla.firefox\", \"com.google.Chrome\" }`.",
"stripped_doc" : [
"Browser bundle IDs pinned to the top of the picker, in display order. Only",
"installed handlers for the URL scheme are shown. Default: `{}`.",
"",
"Example: `{ \"org.mozilla.firefox\", \"com.google.Chrome\" }`."
],
"def" : "URLPicker.pinnedBrowsers",
"desc" : "Browser bundle IDs pinned to the top of the picker, in display order. Only",
"notes" : [
],
"signature" : "URLPicker.pinnedBrowsers",
"type" : "Variable",
"returns" : [
],
"name" : "pinnedBrowsers",
"parameters" : [
]
},
{
"doc" : "Closes the browser picker UI and stops temporary event taps.\n\nParameters:\n * None\n\nReturns:\n * The URLPicker object",
"stripped_doc" : [
"Closes the browser picker UI and stops temporary event taps.",
""
],
"def" : "URLPicker:cleanup()",
"desc" : "Closes the browser picker UI and stops temporary event taps.",
"notes" : [
],
"signature" : "URLPicker:cleanup()",
"type" : "Method",
"returns" : [
" * The URLPicker object"
],
"name" : "cleanup",
"parameters" : [
" * None",
""
]
},
{
"doc" : "Applies configuration values without starting the Spoon.\n\nParameters:\n * config - A table containing any of the following optional keys:\n * autoSetDefaultHandlers - A boolean controlling whether `start()` calls\n `enable()` automatically.\n * restoreDefaultHandlersOnStop - A boolean controlling whether `stop()`\n restores default URL handlers captured by `enable()`.\n * maxCandidates - A number limiting browser candidates shown in the picker.\n * pinnedBrowsers - An array of browser bundle IDs pinned to the top of the\n picker, for example `{ \"org.mozilla.firefox\", \"com.google.Chrome\" }`.\n\nReturns:\n * The URLPicker object",
"stripped_doc" : [
"Applies configuration values without starting the Spoon.",
""
],
"def" : "URLPicker:configure(config)",
"desc" : "Applies configuration values without starting the Spoon.",
"notes" : [
],
"signature" : "URLPicker:configure(config)",
"type" : "Method",
"returns" : [
" * The URLPicker object"
],
"name" : "configure",
"parameters" : [
" * config - A table containing any of the following optional keys:",
" * autoSetDefaultHandlers - A boolean controlling whether `start()` calls",
" `enable()` automatically.",
" * restoreDefaultHandlersOnStop - A boolean controlling whether `stop()`",
" restores default URL handlers captured by `enable()`.",
" * maxCandidates - A number limiting browser candidates shown in the picker.",
" * pinnedBrowsers - An array of browser bundle IDs pinned to the top of the",
" picker, for example `{ \"org.mozilla.firefox\", \"com.google.Chrome\" }`.",
""
]
},
{
"doc" : "Restores the default `http` and `https` URL handlers captured by `enable()`.\n\nParameters:\n * None\n\nReturns:\n * A boolean, true after the restore attempt completes",
"stripped_doc" : [
"Restores the default `http` and `https` URL handlers captured by `enable()`.",
""
],
"def" : "URLPicker:disable()",
"desc" : "Restores the default `http` and `https` URL handlers captured by `enable()`.",
"notes" : [
],
"signature" : "URLPicker:disable()",
"type" : "Method",
"returns" : [
" * A boolean, true after the restore attempt completes"
],
"name" : "disable",
"parameters" : [
" * None",
""
]
},
{
"doc" : "Sets Hammerspoon as the default handler for `http` and `https` URLs.\n\nThe previous handlers are remembered so they can be restored later by\n`disable()` or by `stop()` when `restoreDefaultHandlersOnStop` is true.\n\nParameters:\n * None\n\nReturns:\n * A boolean, true after both default-handler change requests are submitted",
"stripped_doc" : [
"Sets Hammerspoon as the default handler for `http` and `https` URLs.",
"",
"The previous handlers are remembered so they can be restored later by",
"`disable()` or by `stop()` when `restoreDefaultHandlersOnStop` is true.",
""
],
"def" : "URLPicker:enable()",
"desc" : "Sets Hammerspoon as the default handler for `http` and `https` URLs.",
"notes" : [
],
"signature" : "URLPicker:enable()",
"type" : "Method",
"returns" : [
" * A boolean, true after both default-handler change requests are submitted"
],
"name" : "enable",
"parameters" : [
" * None",
""
]
},
{
"doc" : "Initializes the URLPicker Spoon. Called automatically by `hs.loadSpoon()`.\n\nThis method does not register URL handlers, change default browser settings,\nstart event taps, or show UI. Call `start()` to enable URL interception.\n\nParameters:\n * None\n\nReturns:\n * The URLPicker object",
"stripped_doc" : [
"Initializes the URLPicker Spoon. Called automatically by `hs.loadSpoon()`.",
"",
"This method does not register URL handlers, change default browser settings,",
"start event taps, or show UI. Call `start()` to enable URL interception.",
""
],
"def" : "URLPicker:init()",
"desc" : "Initializes the URLPicker Spoon. Called automatically by `hs.loadSpoon()`.",
"notes" : [
],
"signature" : "URLPicker:init()",
"type" : "Method",
"returns" : [
" * The URLPicker object"
],
"name" : "init",
"parameters" : [
" * None",
""
]
},
{
"doc" : "Shows the browser picker for a URL.\n\nParameters:\n * url - A string containing an `http` or `https` URL.\n\nReturns:\n * A boolean, true if the picker was shown, otherwise false",
"stripped_doc" : [
"Shows the browser picker for a URL.",
""
],
"def" : "URLPicker:show(url)",
"desc" : "Shows the browser picker for a URL.",
"notes" : [
],
"signature" : "URLPicker:show(url)",
"type" : "Method",
"returns" : [
" * A boolean, true if the picker was shown, otherwise false"
],
"name" : "show",
"parameters" : [
" * url - A string containing an `http` or `https` URL.",
""
]
},
{
"doc" : "Starts URL interception.\n\nParameters:\n * config - An optional configuration table accepted by `configure()`.\n\nReturns:\n * The URLPicker object",
"stripped_doc" : [
"Starts URL interception.",
""
],
"def" : "URLPicker:start([config])",
"desc" : "Starts URL interception.",
"notes" : [
],
"signature" : "URLPicker:start([config])",
"type" : "Method",
"returns" : [
" * The URLPicker object"
],
"name" : "start",
"parameters" : [
" * config - An optional configuration table accepted by `configure()`.",
""
]
},
{
"doc" : "Stops URL interception and closes any visible picker UI.\n\nParameters:\n * None\n\nReturns:\n * The URLPicker object",
"stripped_doc" : [
"Stops URL interception and closes any visible picker UI.",
""
],
"def" : "URLPicker:stop()",
"desc" : "Stops URL interception and closes any visible picker UI.",
"notes" : [
],
"signature" : "URLPicker:stop()",
"type" : "Method",
"returns" : [
" * The URLPicker object"
],
"name" : "stop",
"parameters" : [
" * None",
""
]
}
],
"name" : "URLPicker"
}
]