import { type AlfredEnv } from "https://deno.land/x/alfredo@0.4.3/lib/alfredo/env/mod.ts";
Properties
Location of the non-volatile workflow data
Recommended location: ~/Library/Application Support/Alfred/Workflow Data/[bundle id]
Location of the volatile workflow data
Recommended location: ~/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/[bundle id]
This is the location of the Alfred.alfredpreferences. If a user has synced their settings, this will allow you to find out where their settings are regardless of sync state.
From Alfred 2.4, non-synced preferences are moving out of the standard macOS preferences due to a Yosemite issue with prefs inheritance between Alfred Preferences.app and Alfred 2.app.
Any local (Mac-specific) preferences are now stored within Alfred.alfredpreferences under …/preferences/local/[alfred_preferences_localhash]/ instead and use Alfred's own preferences framework.
If you're creating icons on the fly, this allows you to find out the colour of the theme background.
Find out what subtext mode the user has selected in the Appearance preferences.
Usability note: This is available so developers can tweak the result text based on the user's selected mode, but a workflow's result text should not be bloated unnecessarily based on this, as the main reason users generally hide the subtext is to make Alfred look cleaner.
Find out which version and build the user is currently running. This may be useful if your workflow depends on a particular Alfred version's features.
Find out which version and build the user is currently running. This may be useful if your workflow depends on a particular Alfred version's features.