-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocs.json
More file actions
265 lines (246 loc) · 10.1 KB
/
Copy pathdocs.json
File metadata and controls
265 lines (246 loc) · 10.1 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
[
{
"Constant" : [
],
"submodules" : [
],
"Function" : [
],
"Variable" : [
],
"stripped_doc" : [
],
"Deprecated" : [
],
"type" : "Module",
"desc" : "Automatically approves macOS's window picker screen\/audio capture alert for a configurable list of trusted applications.",
"Constructor" : [
],
"items" : [
{
"def" : "AutoAllowScreenCapture:configPath()",
"stripped_doc" : [
"Provides the string for the configuration path",
""
],
"parameters" : [
" * None",
""
],
"doc" : "Provides the string for the configuration path\n\nParameters:\n * None\n\nReturns:\n * a string for the path to the configuration file",
"notes" : [
],
"signature" : "AutoAllowScreenCapture:configPath()",
"type" : "Method",
"returns" : [
" * a string for the path to the configuration file"
],
"name" : "configPath",
"desc" : "Provides the string for the configuration path"
},
{
"def" : "AutoAllowScreenCapture:init()",
"stripped_doc" : [
"Initializes the Spoon. Called automatically by hs.loadSpoon().",
""
],
"parameters" : [
" * None",
""
],
"doc" : "Initializes the Spoon. Called automatically by hs.loadSpoon().\n\nParameters:\n * None\n\nReturns:\n * The AutoAllowScreenCapture object",
"notes" : [
],
"signature" : "AutoAllowScreenCapture:init()",
"type" : "Method",
"returns" : [
" * The AutoAllowScreenCapture object"
],
"name" : "init",
"desc" : "Initializes the Spoon. Called automatically by hs.loadSpoon()."
},
{
"def" : "AutoAllowScreenCapture:reloadApps()",
"stripped_doc" : [
"Re-reads and re-validates the config file and restarts the watcher.",
"Required after any appnames or loglevel change -- there is no",
"automatic file watching.",
""
],
"parameters" : [
" * None",
""
],
"doc" : "Re-reads and re-validates the config file and restarts the watcher.\nRequired after any appnames or loglevel change -- there is no\nautomatic file watching.\n\nParameters:\n * None\n\nReturns:\n * The AutoAllowScreenCapture object",
"notes" : [
],
"signature" : "AutoAllowScreenCapture:reloadApps()",
"type" : "Method",
"returns" : [
" * The AutoAllowScreenCapture object"
],
"name" : "reloadApps",
"desc" : "Re-reads and re-validates the config file and restarts the watcher."
},
{
"def" : "AutoAllowScreenCapture:start()",
"stripped_doc" : [
"Verifies the preferences were read, then starts hooking window creation to circumvent",
"the indicated notifications",
""
],
"parameters" : [
" * None",
""
],
"doc" : "Verifies the preferences were read, then starts hooking window creation to circumvent\nthe indicated notifications\n\nParameters:\n * None\n\nReturns:\n * The AutoAllowScreenCapture object",
"notes" : [
],
"signature" : "AutoAllowScreenCapture:start()",
"type" : "Method",
"returns" : [
" * The AutoAllowScreenCapture object"
],
"name" : "start",
"desc" : "Verifies the preferences were read, then starts hooking window creation to circumvent"
},
{
"def" : "AutoAllowScreenCapture:stop()",
"stripped_doc" : [
"Stops notification window monitoring",
""
],
"parameters" : [
" * None",
""
],
"doc" : "Stops notification window monitoring\n\nParameters:\n * None\n\nReturns:\n * The AutoAllowScreenCapture object",
"notes" : [
],
"signature" : "AutoAllowScreenCapture:stop()",
"type" : "Method",
"returns" : [
" * The AutoAllowScreenCapture object"
],
"name" : "stop",
"desc" : "Stops notification window monitoring"
}
],
"Method" : [
{
"def" : "AutoAllowScreenCapture:init()",
"stripped_doc" : [
"Initializes the Spoon. Called automatically by hs.loadSpoon().",
""
],
"parameters" : [
" * None",
""
],
"doc" : "Initializes the Spoon. Called automatically by hs.loadSpoon().\n\nParameters:\n * None\n\nReturns:\n * The AutoAllowScreenCapture object",
"notes" : [
],
"signature" : "AutoAllowScreenCapture:init()",
"type" : "Method",
"returns" : [
" * The AutoAllowScreenCapture object"
],
"name" : "init",
"desc" : "Initializes the Spoon. Called automatically by hs.loadSpoon()."
},
{
"def" : "AutoAllowScreenCapture:configPath()",
"stripped_doc" : [
"Provides the string for the configuration path",
""
],
"parameters" : [
" * None",
""
],
"doc" : "Provides the string for the configuration path\n\nParameters:\n * None\n\nReturns:\n * a string for the path to the configuration file",
"notes" : [
],
"signature" : "AutoAllowScreenCapture:configPath()",
"type" : "Method",
"returns" : [
" * a string for the path to the configuration file"
],
"name" : "configPath",
"desc" : "Provides the string for the configuration path"
},
{
"def" : "AutoAllowScreenCapture:start()",
"stripped_doc" : [
"Verifies the preferences were read, then starts hooking window creation to circumvent",
"the indicated notifications",
""
],
"parameters" : [
" * None",
""
],
"doc" : "Verifies the preferences were read, then starts hooking window creation to circumvent\nthe indicated notifications\n\nParameters:\n * None\n\nReturns:\n * The AutoAllowScreenCapture object",
"notes" : [
],
"signature" : "AutoAllowScreenCapture:start()",
"type" : "Method",
"returns" : [
" * The AutoAllowScreenCapture object"
],
"name" : "start",
"desc" : "Verifies the preferences were read, then starts hooking window creation to circumvent"
},
{
"def" : "AutoAllowScreenCapture:stop()",
"stripped_doc" : [
"Stops notification window monitoring",
""
],
"parameters" : [
" * None",
""
],
"doc" : "Stops notification window monitoring\n\nParameters:\n * None\n\nReturns:\n * The AutoAllowScreenCapture object",
"notes" : [
],
"signature" : "AutoAllowScreenCapture:stop()",
"type" : "Method",
"returns" : [
" * The AutoAllowScreenCapture object"
],
"name" : "stop",
"desc" : "Stops notification window monitoring"
},
{
"def" : "AutoAllowScreenCapture:reloadApps()",
"stripped_doc" : [
"Re-reads and re-validates the config file and restarts the watcher.",
"Required after any appnames or loglevel change -- there is no",
"automatic file watching.",
""
],
"parameters" : [
" * None",
""
],
"doc" : "Re-reads and re-validates the config file and restarts the watcher.\nRequired after any appnames or loglevel change -- there is no\nautomatic file watching.\n\nParameters:\n * None\n\nReturns:\n * The AutoAllowScreenCapture object",
"notes" : [
],
"signature" : "AutoAllowScreenCapture:reloadApps()",
"type" : "Method",
"returns" : [
" * The AutoAllowScreenCapture object"
],
"name" : "reloadApps",
"desc" : "Re-reads and re-validates the config file and restarts the watcher."
}
],
"Command" : [
],
"Field" : [
],
"doc" : "Automatically approves macOS's window picker screen\/audio capture alert for a configurable list of trusted applications.\n\nMatch strategy: checks that the window is a genuine OS-presented\nsystem dialog -- role AXWindow, subrole AXSystemDialog, owned by\ncom.apple.UserNotificationCenter -- then looks at its direct children\nfor an AXStaticText whose value exactly matches the expected sentence\nfor one of the configured app names.\n\nConfig file (OUTSIDE this Spoon, in your Hammerspoon config dir):\n\n <hs.configdir>\/Prefs\/auto-allow-apps.json\n\n\nFormat:\n { \"appnames\": [\"Thaw\", \"RustDesk\"], \"loglevel\": \"info\" }\n\nappnames: array of app name strings (may be empty -- watcher just\n won't install).\nloglevel: 'nothing', 'error', 'warning', 'info', 'debug', or\n 'verbose', or the corresponding number 0-5, per hs.logger's own\n documented levels. Defaults to \"info\" if the file itself is\n missing; but if the file EXISTS and loglevel is present but not\n one of these, that's a hard validation failure (see below).\n\nValidation \/ failure behavior: a malformed JSON file, a missing or\nwrong-shaped \"appnames\", or an invalid \"loglevel\" all log a specific\nerror at error level and leave the Spoon inert -- no window watcher\ngets installed. There is no live file-watching: change appnames or\nloglevel, then call reloadApps() (or hs.reload()) to pick it up.\n\nDebugging: logs through hs.logger under \"AutoAllowSC\" (dot syntax\nrequired -- see hs.logger docs). Starts at \"info\" until a valid\nconfig is loaded, which then applies the configured level.\n\n spoon.AutoAllowScreenCapture.logger.setLogLevel(\"debug\")\n\nTest the label-matching logic against a plain string:\n\n spoon.AutoAllowScreenCapture:testLabelMatch('\"Thaw\" is requesting to bypass the system private window picker and directly access your screen and audio.')\n\nTest the full gate against a captured window object:\n\n spoon.AutoAllowScreenCapture:testWindow(x[14])",
"name" : "AutoAllowScreenCapture"
}
]