Closed omriza closed 6 years ago
Unluckily I use my Mac very rarely now. I'll try to reproduce/fix this on the weekend.
Easiest way to reproduce is to run the lay_config keyword cmd from an Alfred3 instance. If not already exists, this will create:
~/Library/Application\ Support/Alfred\ 2/Workflow\ Data/de.leanovate.alfred.layout
~/Library/Application\ Support/Alfred\ 2/Workflow\ Data/de.leanovate.alfred.layout/layouts.yaml
I'm not sure how Alfred2 handles relative paths, just a note for testing, we don't want to break Alfred2 backwards compatibility.
Let me know if you don't get to fix it, I can do it and open a PR.
A PR would be cool as I'm not sure what version of Alfred I still have.
Made some minor changes, but otherwise lgtm. Uploaded the new version to packal.
Just reopen the issue if it's not working for reasons.
I was trying to add some new layouts by editing layouts.yaml in the workflow path. When testing the new layouts I saw that this file is never being read by the layout_select.pl script. Only then I figured out that there's a keyword for that purpose (lay_config), but yet, when using Alfred3, this keyword's logic will create the files in a wrong path (which will still work, but won't be as nice).
Absolute paths for files, like in this line from lay_config bash script:
if [ ! -d ~/Library/Application\ Support/Alfred\ 2/Workflow\ Data/de.leanovate.alfred.layout ]; then
Makes the target files being created in wrong paths for Alfred3 users. In addition, layout_select.pl uses this same absolute path to load custom layouts.This issue can be easily fixed by using relative paths, Alfred runs embedded scripts from the main workflow path so ./Data/de.leanovate.alfred.layout/layouts.yaml will suite the case.
Thanks for this very useful workflow!