Skip to content

Commit d22ee78

Browse files
committed
generate docs
`hs -c "hs.doc.builder.genJSON(\"$(pwd)\")" | grep -v "^--" > docs.json`
1 parent 34db9db commit d22ee78

File tree

1 file changed

+27
-195
lines changed

1 file changed

+27
-195
lines changed

docs.json

Lines changed: 27 additions & 195 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@
1515
"stripped_doc" : [
1616

1717
],
18-
"desc" : "You need in namespace a table at `config.spaces`.",
1918
"Deprecated" : [
2019

2120
],
2221
"type" : "Module",
22+
"desc" : "Headspace allows you to protect your focus for certain tasks by creating",
2323
"Constructor" : [
2424

2525
],
26-
"doc" : "You need in namespace a table at `config.spaces`.\n`config.spaces` is a table that is passed to a chooser.\n\nYou can specify blocking of apps via a `whitelist`, `blacklist`, and you can\nsay what you want to have `launch` when you launch that space.\n\nA space with a `blacklist` will allow anything _but_ apps tagged with the\nblacklist tags, untagged apps, or apps with a whitelisted attribute.\n\nA space with a `whitelist` will allow **only** the apps tagged with tags in\nthe whitelist, untagged apps, or apps with a whitelisted attribute.\n\nThere is presently an interaction between the two where if an app is\nwhitelisted by a tag and blacklisted by a tag, whitelist wins.\n\nThe `launch` list tells the space to auto launch certain things at startup.\n\nOptionally, you can define a setup function at config.spaces.<key> that is\nrun when the space is started.\n\nOPTIONS:\n\nIf you are using toggl timer, putting anything in quotes will pass that as a\ncustom description to toggl. e.g. Design \"Working on jira ticket\" will match\na space named Design, but pass a custom description to your timer.\n\nIf you want a pomodoro countdown, add a colon followed by integers. e.g. :45\nwill count down 45 minutes, then play a musical cue and prompt you to choose\na new space.\n\n# Example:\n\nconfig.spaces = {\n text = \"Example\",\n subText = \"More about the example\",\n image = hs.image.imageFromAppBundle('foo.bar.com'),\n\n funcs = \"example\",\n\n launch = {\"table\", \"of\", \"tags\"},\n blacklist = {\"table\", \"of\", \"tags\"},\n == OR ==\n whitelist = {\"table\", \"of\", \"tags\"}\n\n togglProj = \"id of toggl project\",\n togglDesc = \"description of toggl timer\n\n intentRequired = true\n intentSuggestions = {}\n}\n\nconfig.funcs.example = {\n setup = function()\n hs.urlevent.openURL(\"http:\/\/hammerspoon.org\")\n end\n}\n\nThe goal is to get into another space, even when working from home.\n\nFuture expansions...\nDND status?\nCustom Desktop Background with prompts for focus, writing, code?\nMusical cues?",
27-
"Method" : [
26+
"items" : [
2827
{
29-
"doc" : "Starts the application watcher that \"blocks\" applications.\n\nReturns:\n * self",
28+
"def" : "Headspace:start() -> table",
3029
"stripped_doc" : [
31-
"Starts the application watcher that \"blocks\" applications.",
30+
"Starts the application watcher that \"blocks\" applications and sets up",
31+
"bindings for URL schemes.",
3232
""
3333
],
34-
"def" : "Headspace:start() -> table",
34+
"doc" : "Starts the application watcher that \"blocks\" applications and sets up\nbindings for URL schemes.\n\nReturns:\n * self",
3535
"name" : "start",
3636
"notes" : [
3737

@@ -41,195 +41,41 @@
4141
"returns" : [
4242
" * self"
4343
],
44-
"desc" : "Starts the application watcher that \"blocks\" applications.",
44+
"desc" : "Starts the application watcher that \"blocks\" applications and sets up",
4545
"parameters" : [
4646

4747
]
4848
},
4949
{
50-
"doc" : "Kills the application watcher and any running timers.\n\nReturns:\n * self",
51-
"stripped_doc" : [
52-
"Kills the application watcher and any running timers.",
53-
""
54-
],
5550
"def" : "Headspace:stop() -> table",
56-
"name" : "stop",
57-
"notes" : [
58-
59-
],
60-
"signature" : "Headspace:stop() -> table",
61-
"type" : "Method",
62-
"returns" : [
63-
" * self"
64-
],
65-
"desc" : "Kills the application watcher and any running timers.",
66-
"parameters" : [
67-
68-
]
69-
},
70-
{
71-
"doc" : "Adds a device to USBObserver's watch list\n\nParameters:\n * configTable - A table containing the spaces and applications.-\n\nReturns:\n * self",
7251
"stripped_doc" : [
73-
"Adds a device to USBObserver's watch list",
74-
""
75-
],
76-
"def" : "Headspace:loadConfig(configTable) -> table",
77-
"name" : "loadConfig",
78-
"notes" : [
7952

8053
],
81-
"signature" : "Headspace:loadConfig(configTable) -> table",
82-
"type" : "Method",
83-
"returns" : [
84-
" * self"
85-
],
86-
"desc" : "Adds a device to USBObserver's watch list",
87-
"parameters" : [
88-
" * configTable - A table containing the spaces and applications.-",
89-
""
90-
]
91-
},
92-
{
93-
"doc" : "Sets the toggl API key.\n\nParameters:\n * key - Your toggl API key as a string.\n\nReturns:\n * self",
94-
"stripped_doc" : [
95-
"Sets the toggl API key.",
96-
""
97-
],
98-
"def" : "Headspace:setTogglKey(key) -> table",
99-
"name" : "setTogglKey",
54+
"doc" : "Returns:\n * self",
55+
"name" : "stop",
10056
"notes" : [
10157

10258
],
103-
"signature" : "Headspace:setTogglKey(key) -> table",
59+
"signature" : "Headspace:stop() -> table",
10460
"type" : "Method",
10561
"returns" : [
10662
" * self"
10763
],
108-
"desc" : "Sets the toggl API key.",
109-
"parameters" : [
110-
" * key - Your toggl API key as a string.",
111-
""
112-
]
113-
},
114-
{
115-
"doc" : "Stops any running toggl timers",
116-
"stripped_doc" : [
117-
"Stops any running toggl timers"
118-
],
119-
"def" : "Headspace.stopToggl() -> nil",
120-
"name" : "stopToggl",
121-
"notes" : [
122-
123-
],
124-
"signature" : "Headspace.stopToggl() -> nil",
125-
"type" : "Method",
126-
"returns" : [
127-
128-
],
129-
"desc" : "Stops any running toggl timers",
130-
"parameters" : [
131-
132-
]
133-
},
134-
{
135-
"doc" : "Launch an hs.chooser to select a new headspace.",
136-
"stripped_doc" : [
137-
"Launch an hs.chooser to select a new headspace."
138-
],
139-
"def" : "Headspace.choose() -> nil",
140-
"name" : "choose",
141-
"notes" : [
142-
143-
],
144-
"signature" : "Headspace.choose() -> nil",
145-
"type" : "Method",
146-
"returns" : [
147-
148-
],
149-
"desc" : "Launch an hs.chooser to select a new headspace.",
64+
"desc" : "",
15065
"parameters" : [
15166

15267
]
15368
}
15469
],
155-
"Command" : [
156-
157-
],
158-
"Field" : [
159-
160-
],
161-
"items" : [
162-
{
163-
"doc" : "Launch an hs.chooser to select a new headspace.",
164-
"stripped_doc" : [
165-
"Launch an hs.chooser to select a new headspace."
166-
],
167-
"def" : "Headspace.choose() -> nil",
168-
"name" : "choose",
169-
"notes" : [
170-
171-
],
172-
"signature" : "Headspace.choose() -> nil",
173-
"type" : "Method",
174-
"returns" : [
175-
176-
],
177-
"desc" : "Launch an hs.chooser to select a new headspace.",
178-
"parameters" : [
179-
180-
]
181-
},
182-
{
183-
"doc" : "Adds a device to USBObserver's watch list\n\nParameters:\n * configTable - A table containing the spaces and applications.-\n\nReturns:\n * self",
184-
"stripped_doc" : [
185-
"Adds a device to USBObserver's watch list",
186-
""
187-
],
188-
"def" : "Headspace:loadConfig(configTable) -> table",
189-
"name" : "loadConfig",
190-
"notes" : [
191-
192-
],
193-
"signature" : "Headspace:loadConfig(configTable) -> table",
194-
"type" : "Method",
195-
"returns" : [
196-
" * self"
197-
],
198-
"desc" : "Adds a device to USBObserver's watch list",
199-
"parameters" : [
200-
" * configTable - A table containing the spaces and applications.-",
201-
""
202-
]
203-
},
204-
{
205-
"doc" : "Sets the toggl API key.\n\nParameters:\n * key - Your toggl API key as a string.\n\nReturns:\n * self",
206-
"stripped_doc" : [
207-
"Sets the toggl API key.",
208-
""
209-
],
210-
"def" : "Headspace:setTogglKey(key) -> table",
211-
"name" : "setTogglKey",
212-
"notes" : [
213-
214-
],
215-
"signature" : "Headspace:setTogglKey(key) -> table",
216-
"type" : "Method",
217-
"returns" : [
218-
" * self"
219-
],
220-
"desc" : "Sets the toggl API key.",
221-
"parameters" : [
222-
" * key - Your toggl API key as a string.",
223-
""
224-
]
225-
},
70+
"Method" : [
22671
{
227-
"doc" : "Starts the application watcher that \"blocks\" applications.\n\nReturns:\n * self",
72+
"def" : "Headspace:start() -> table",
22873
"stripped_doc" : [
229-
"Starts the application watcher that \"blocks\" applications.",
74+
"Starts the application watcher that \"blocks\" applications and sets up",
75+
"bindings for URL schemes.",
23076
""
23177
],
232-
"def" : "Headspace:start() -> table",
78+
"doc" : "Starts the application watcher that \"blocks\" applications and sets up\nbindings for URL schemes.\n\nReturns:\n * self",
23379
"name" : "start",
23480
"notes" : [
23581

@@ -239,18 +85,17 @@
23985
"returns" : [
24086
" * self"
24187
],
242-
"desc" : "Starts the application watcher that \"blocks\" applications.",
88+
"desc" : "Starts the application watcher that \"blocks\" applications and sets up",
24389
"parameters" : [
24490

24591
]
24692
},
24793
{
248-
"doc" : "Kills the application watcher and any running timers.\n\nReturns:\n * self",
94+
"def" : "Headspace:stop() -> table",
24995
"stripped_doc" : [
250-
"Kills the application watcher and any running timers.",
251-
""
96+
25297
],
253-
"def" : "Headspace:stop() -> table",
98+
"doc" : "Returns:\n * self",
25499
"name" : "stop",
255100
"notes" : [
256101

@@ -260,32 +105,19 @@
260105
"returns" : [
261106
" * self"
262107
],
263-
"desc" : "Kills the application watcher and any running timers.",
108+
"desc" : "",
264109
"parameters" : [
265110

266111
]
267-
},
268-
{
269-
"doc" : "Stops any running toggl timers",
270-
"stripped_doc" : [
271-
"Stops any running toggl timers"
272-
],
273-
"def" : "Headspace.stopToggl() -> nil",
274-
"name" : "stopToggl",
275-
"notes" : [
276-
277-
],
278-
"signature" : "Headspace.stopToggl() -> nil",
279-
"type" : "Method",
280-
"returns" : [
112+
}
113+
],
114+
"Command" : [
281115

282-
],
283-
"desc" : "Stops any running toggl timers",
284-
"parameters" : [
116+
],
117+
"Field" : [
285118

286-
]
287-
}
288119
],
120+
"doc" : "Headspace allows you to protect your focus for certain tasks by creating\napplication blacklist or whitelists.\n\nHeadspace listens for URL schemes of the following format:\n`hammerspoon:\/\/setBlacklist?tags=comma,separated,tags&apps=comma,separated,names`\n`hammerspoon:\/\/setWhitelist?tags=comma,separated,tags&apps=comma,separated,names`\n`hammerspoon:\/\/stopHeadspace`\n\n`setBlacklist` and `setWhitelist` are exclusive. Setting a new list will\nwipe out the previous settings. If an app is either tagged in the\nfilesystem with a matching tag or it's name is in the `apps` list it will\nbe matched and the rules applied.",
289121
"name" : "Headspace"
290122
}
291123
]

0 commit comments

Comments
 (0)