Skip to content

Commit

Permalink
Roll Config into Alfred
Browse files Browse the repository at this point in the history
  • Loading branch information
deanishe committed Feb 22, 2018
1 parent 0d24b02 commit 49bf067
Show file tree
Hide file tree
Showing 20 changed files with 2,059 additions and 291 deletions.
9 changes: 5 additions & 4 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@

Refactor:
- Add FieldNum to binding (save all the iteration) @done(2018-02-13)
- Update API: Dodgy?
- Fuzzy API: Dodgy?

Features:
- Conf: fallbacks for unset *and* empty variables
- Bind to struct via tags
- Conf: fallbacks for unset *and* empty variables @done(2018-02-12)
- Bind to struct via tags @done(2018-02-11)
- Add RunScriptFile to util @done(2018-02-11)
- Add Alfred struct @done(2018-02-11)
- NewAlfred() @done(2018-02-11)
Expand All @@ -30,7 +31,7 @@ Archive:
- Caching @done(2017-08-13) @project(Features)
Read/write bytes to named cache/data file.
LoadOrSave() - Read from cache or reload and cache.
- Make SemVer accept pre-release data without minor and patch numbers. @done(17-09-15 16:09) @project(Features)
- Separate HTTP connect and download timeouts in update.go. @done(17-09-15 15:52) @project(Features)
- Make SemVer accept pre-release data without minor and patch numbers. @done(2017-09-15) @project(Features)
- Separate HTTP connect and download timeouts in update.go. @done(2017-09-15) @project(Features)

# vim: ft=taskpaper ts=2 sw=2 tw=80 noet :
22 changes: 22 additions & 0 deletions _examples/settings/.autoenv.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@


#!/bin/bash

# When sourced, creates an Alfred-like environment needed by modd
# and ./bin/build (which sources the file itself)

# getvar <name> | Read a value from info.plist
getvar() {
local v="$1"
/usr/libexec/PlistBuddy -c "Print :$v" info.plist
}

# stuff in info.plist
export alfred_workflow_bundleid=$( getvar "bundleid" )
export alfred_workflow_version=$( getvar "version" )
export alfred_workflow_name=$( getvar "name" )

# workflow data and cache directories
export alfred_workflow_data="${HOME}/Library/Application Support/Alfred 3/Workflow Data/${alfred_workflow_bundleid}"
export alfred_workflow_cache="${HOME}/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/${alfred_workflow_bundleid}"

6 changes: 6 additions & 0 deletions _examples/settings/.autoenv_leave.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

unset alfred_workflow_bundleid
unset alfred_workflow_version
unset alfred_workflow_name
unset alfred_workflow_data
unset alfred_workflow_cache
3 changes: 3 additions & 0 deletions _examples/settings/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Ignore binary
/settings

Binary file added _examples/settings/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 49bf067

Please sign in to comment.