Skip to content

jeppestaerk/alter-alfred-workflow-variables

Repository files navigation

alter-alfred-workflow-variables Build Status

Alter Alfred workflow environment variables

Install

$ npm install alter-alfred-workflow-variables

Usage

const AAWV = require('alter-alfred-workflow-variables');
const variables = new AAWV();

variables.set('foo', 'bar');

variables.get('foo');
//=> 'bar'

variables.has('foo');
//=> true
  • WARNING: As of Alfred 3.4.1, Alfred takes several seconds to notice when info.plist has been updated by something other than itself. As a result, relying on altering info.plist programmatically can be problematic, as Alfred won't notice the changes for several seconds (5–10 seconds is typical on my machine). If you update a workflow variable in info.plist and run your workflow again immediately, it is unlikely that Alfred will have picked up the change.
  • Don't forget: any changes you make to info.plist only take effect the next time the workflow is run. This likely doesn't matter in most cases, but if you need a variable to be updated immediately (i.e. also for the current workflow run), you must also set it "live" using one of the methods described in the Setting variables section above.

Source: Alfred App Community Forum [HOW TO] Workflow/environment variables

License

MIT © Jeppe Stærk

About

Alter workflow environment variables programmatically

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published