Jump to content

jandubois

Member
  • Posts

    3
  • Joined

  • Last visited

Reputation Activity

  1. Like
    jandubois got a reaction from mklement0 in Workflows Best Practices   
    Yes, that is a good point.
     
    I think one possible solution would be for Alfred to provide 2 environment variables to all scripts it executes: $ALFRED_CACHE and $ALFRED_CONFIG. They would be set up to point to the volatile and non-volatile app data directories (including the bundle id). By default $ALFRED_CONFIG would point to the regular ~/Library/Application Support/... folder, but if the user sets a Sync Folder, then these config directories will be moved to a subdirectory of the sync folder.  The $ALFRED_CACHE setting however would continue to point to ~/Library/Caches/...
     
    It should be the responsibility of the workflow to create the actual cache and/or config directories because not every workflow needs them; Alfred would just provide the paths, but the workflow has to execute `mkdir -p "$ALFRED_CONFIG"` before creating any files in them.
     
    I don't have an opinion (yet) what should happen if the workflow doesn't have a bundle id. Maybe the $ALFRED_* variables should then not be set at all?
     
    A side benefit of this scheme is that workflow code doesn't need to embed the bundle id to create these directory paths themselves; changing the bundle id via the Alfred GUI would be enough to change them.
  2. Like
    jandubois reacted to rice.shawn in Context Menu for Workflows   
    It seems that most every program has a context menu (the sort of ctrl+click or two finger click) that users expect to be there. Alfred2 doesn't have one in the workflow editor, but it could be good to add one that would at least pop up something like "Delete Item" or whatever else might be useful. If the context menu is called on a blank part of the canvas, then it could just replicate the function that the + button has.
×
×
  • Create New...