Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeboer committed Apr 20, 2017
1 parent 46a1084 commit fd8be8b
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Type: `boolean`

Default: `true`

Use the `/tmp/<workflow bundle id>` directory for your workflow cache when `true`. When `false` it will use the path in the `alfred_workflow_cache` environment variable as cache directory, which is set by Alfred by default. You can override this environment variable if you like to set a custom cache directory.
Use the OS temp directory for your workflow cache when `true`, otherwise use the directory set by Alfred in the`alfred_workflow_cache` environment variable. It's recommended to leave this set at `true` unless you want your cache to survive reboots and clean it up yourself every once in a while.

### Properties

Expand All @@ -138,10 +138,13 @@ Type: `Object`

Collection of Alfred metadata that is available to the script through environment variables. See the alfred documentation for more info: https://www.alfredapp.com/help/workflows/script-environment-variables/.

When you use a custom Alfred theme, the `themeFile` property will be set to the path of the theme file (which is a JSON file). Also see [Hugo.alfredTheme](#hugo.alfredtheme).

```javascript
{
version: process.env.alfred_version,
theme: process.env.alfred_theme,
themeFile: '',
themeBackground: process.env.alfred_theme_background,
themeSelectionBackground: process.env.alfred_theme_selection_background,
themeSubtext: parseFloat(process.env.alfred_theme_subtext),
Expand All @@ -152,6 +155,12 @@ Collection of Alfred metadata that is available to the script through environmen
```
*Also see: [Hugo.workflowMeta](#hugo.workflowmeta)*

#### Hugo.alfredTheme

Type: `Object`

When a custom Alfred theme is used, this will return the contents of the theme file. Usefull if you need to render icons on-the-fly and want to know the background colour.

#### Hugo.cache

Type: [`cache-conf `](https://github.com/samverschueren/cache-conf)
Expand Down Expand Up @@ -316,6 +325,12 @@ Check out [file-cache.js.flow](file-cache.js.flow) and the [example](examples/fi

Checks for workflow package updates on either NPM or Packal when enabled. No need to call this method manually, updates will be checked automagically ​:sparkles:

#### Hugo.clearCache()

Empties the workflow cache directory but doesn't remove the directory itself.

Call `Hugo.clearCacheSync()` if you need it synchronously.

#### Hugo.filterItems(query, options)

Fuzzy filter the output buffer by search query using Fuse.js. Add items to the output buffer first and then call `filterItems` to remove the items that do not match the search query. This method alters the output buffer directly.
Expand Down

0 comments on commit fd8be8b

Please sign in to comment.