prefs¶
- class afwf.alfred.prefs.AlfredPreferences[source]¶
Reads Alfred’s
prefs.jsonto locate the active Alfred preferences folder and its nested workflow directories.All attributes are lazily evaluated and cached on first access.
~/Library/Application Support/Alfred/prefs.jsonexample:{ "current": "/Users/you/Documents/Alfred-Settings/Alfred.alfredpreferences", "localhash": "eca048243db0aaa88c88989d699c5ff94a75b844", "syncfolders": { "5": "~/Documents/Alfred-Settings" } }
- property dir_alfred_preferences: Path¶
The active Alfred preferences folder (
Alfred.alfredpreferences).Resolved from the
currentkey inprefs.json.
- property dir_workflows: Path¶
The
workflows/directory inside the active Alfred preferences folder.All user workflows live here as sub-folders named
user.workflow.<UUID>.
- get_workflow(workflow_id: str) AlfredWorkflow[source]¶
Return an
AlfredWorkflowfor the given UUID.- Parameters:
workflow_id – The workflow UUID, e.g.
"76458317-5B0A-40E7-A328-DC6C900EC1B9".
- list_workflows() list[source]¶
Return a list of
AlfredWorkflowobjects for every workflow folder found indir_workflows.