Crate powerpack_env

Source
Expand description

Useful environment variables in Alfred workflows.

See https://www.alfredapp.com/help/workflows/script-environment-variables/

§Usage

This crate is re-exported from the powerpack crate, so you can access it using powerpack::env.

use powerpack::env;

let cache_dir = env::workflow_cache();

Functions§

is_debug
Whether or not the user currently has the Alfred debug panel open.
preferences
The location of the Alfred.alfredpreferences directory.
try_workflow_cache_or_default
The workflow cache directory or sensible default value.
try_workflow_data_or_default
The workflow data directory or sensible default value.
var
Fetches the environment variable key from the current process.
var_os
Fetches the environment variable key from the current process.
version
The Alfred version that is currently running.
version_build
The Alfred build version that is currently running.
workflow_bundle_id
The bundle ID of the currently running workflow.
workflow_cache
The recommended directory for volatile workflow data.
workflow_cache_or_default
The workflow cache directory or sensible default value.
workflow_data
The recommended directory for non-volatile workflow data.
workflow_data_or_default
The workflow data directory or sensible default value.
workflow_name
The name of the currently running workflow.
workflow_uid
The unique ID of the currently running workflow.
workflow_version
The version of the currently running workflow.