constants

Alfred Workflow Script Filter protocol constants.

All special string values defined by the Alfred Script Filter JSON spec are collected here as BetterStrEnum subclasses so that workflow developers can use them without memorising raw strings.

Ref: https://www.alfredapp.com/help/workflows/inputs/script-filter/json/

class afwf.constants.IconTypeEnum(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Allowed values for icon.type in a Script Filter item.

  • fileicon — Alfred uses the file-system icon of the file at icon.path

  • filetypeicon.path is treated as a UTI (e.g. "com.apple.rtfd")

  • (omitted)icon.path is a path relative to the workflow root folder

Ref: search icon : OBJECT in the Alfred Script Filter JSON docs.

class afwf.constants.ItemTypeEnum(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Allowed values for item.type in a Script Filter item.

  • file — Alfred treats the result as a file; checks existence before showing

  • file:skipcheck — Same as file but skips the existence check

Ref: search type : STRING in the Alfred Script Filter JSON docs.

class afwf.constants.ModEnum(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Modifier key identifiers for the item.mods object.

Used as keys inside mods to define alternate behaviour when the user holds a modifier key while actioning an item.

Note: when a mod entry contains a variables key, it replaces (not merges with) the item’s variables. An empty "variables": {} on a mod explicitly prevents inheriting the item’s variables.

Ref: search mods : OBJECT in the Alfred Script Filter JSON docs.

class afwf.constants.VarKeyEnum(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Variable key names used by this framework’s built-in set_* helpers on Item.

These variable names are conventions understood by the accompanying Alfred workflow widgets (Conditional, Open File, Run Script, etc.).

class afwf.constants.VarValueEnum(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Standard boolean-style variable values used by this framework’s set_* helpers. Alfred widget conditions check against these strings.