-
-
Notifications
You must be signed in to change notification settings - Fork 33
/
.env
24 lines (20 loc) · 1.13 KB
/
.env
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# When sourced, creates an Alfred-like environment needed by modd
# getvar <name> | Read a value from info.plist
getvar() {
local v="$1"
/usr/libexec/PlistBuddy -c "Print :$v" info.plist
}
export alfred_workflow_bundleid=$( getvar "bundleid" )
export alfred_workflow_version=$( getvar "version" )
export alfred_workflow_name=$( getvar "name" )
export USER_ID=$( getvar "variables:USER_ID" )
# export USER_FEED_KEY=$( getvar "variables:USER_FEED_KEY" )
export alfred_workflow_cache="${HOME}/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/${alfred_workflow_bundleid}"
export alfred_workflow_data="${HOME}/Library/Application Support/Alfred/Workflow Data/${alfred_workflow_bundleid}"
export alfred_version="4.0.2"
# Alfred 3 environment if Alfred 4+ prefs file doesn't exist.
if [[ ! -f "$HOME/Library/Application Support/Alfred/prefs.json" ]]; then
export alfred_workflow_cache="${HOME}/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/${alfred_workflow_bundleid}"
export alfred_workflow_data="${HOME}/Library/Application Support/Alfred 3/Workflow Data/${alfred_workflow_bundleid}"
export alfred_version="3.8.1"
fi