Alfred v0.3.0 Alfred View Source

A library for interoperating with Alfred, intended to make it easy to create tools and workflow extensions for Alfred in Elixir.

This module contains functions to access the Alfred Script Environment variables.

Link to this section Summary

Functions

Retrieves the Alfred version build number

Determines if Alfred is debugging the workflow

Retrieves the Alfred preferences information

Retrieves the Alfred theme information

Gets the Alfred version running the workflow

Gets the Alfred version text

Retrieves the Alfred workflow information

Link to this section Types

Link to this type preferences() View Source
preferences() :: %{localhash: String.t, path: String.t}
Link to this type theme() View Source
theme() :: %{background_color: String.t, id: String.t, selection_background_color: String.t, subtext: String.t}
Link to this type workflow() View Source
workflow() :: %{bundleid: String.t, cache_path: String.t, data_path: String.t, name: String.t, uid: String.t, version: Version.t, version_text: String.t}

Link to this section Functions

Retrieves the Alfred version build number.

From the environment variable alfred_version_build.

Link to this function debugging?() View Source
debugging?() :: boolean

Determines if Alfred is debugging the workflow.

From the environment variable alfred_debug.

Link to this function preferences_info() View Source
preferences_info() :: preferences

Retrieves the Alfred preferences information.

Returns a map with the following keys:

  • :path — from environment alfred_preferences
  • :localhash — from environment alfred_preferences_localhash
Link to this function theme_info() View Source
theme_info() :: theme

Retrieves the Alfred theme information.

Returns a map with the following keys:

  • :background_color — from environment alfred_theme_background
  • :id — from environment alfred_theme
  • :selection_background_color — from environment alfred_theme_selection_background
  • :subtext — from environment alfred_theme_subtext

Gets the Alfred version running the workflow.

Returns a Version containing the version information parsed from environment alfred_version.

Link to this function version_text() View Source
version_text() :: String.t

Gets the Alfred version text.

From the environment alfred_version.

Link to this function workflow_info() View Source
workflow_info() :: workflow

Retrieves the Alfred workflow information.

Returns a map with the following keys:

  • :bundleid — from environment alfred_workflow_bundleid
  • :cache_path — from environment alfred_workflow_cache
  • :data_path — from environment alfred_workflow_data
  • :name — from environment alfred_workflow_name
  • :uid — from environment alfred_workflow_uid
  • :version — the information from :version_text parsed into a Version struct
  • :version_text — from environment alfred_workflow_version