Jump to content

[SOLVED] Advanced -> Set Preferences Folder affects location of Alfred.alfredpreferences only


Recommended Posts

Hi,

 

I'd expect that after changing my preferences folder, it will also affect location of the workflows (including their working directories). But somehow it only affects location of the Alfred.alfredpreferences

 

image.png.997da72dd9d5e1f1313971bbd85acdcc.png

 

But it does not change Workflow Data location. Here an example:

 

  • In my workflow, I use these two variables. Below values when using a default location:
alfred_workflow_data /Users/jhartman/Library/Application Support/Alfred 3/Workflow Data/carlosnz.timezones2
alfred_preferences /Users/jhartman/Library/Application Support/Alfred 3/Alfred.alfredpreferences

 

  • After changing Preferences Folder:
alfred_workflow_data /Users/jhartman/Library/Application Support/Alfred 3/Workflow Data/carlosnz.timezones2
alfred_preferences /Users/jhartman/Downloads/Alfred/Alfred.alfredpreferences

As you can see, still points to the old location.

 

Edit I think bottom question is: how to handle custom workflow preferences to allow them being synchronised across different laptops, alongside Alfred preferences?

 

To me it somehow invalidates the idea of syncing the configuration? Or em I missing something?

Thank you,

Jarek

 

---------------

 

Alfred 3.8.2 Build 963, Friday 31st May 2019

MacOS 10.14.6 (18G87)

Can be consistently reproduced

Edited by Jarek
Link to comment
4 hours ago, Jarek said:

To me it somehow invalidates the idea of syncing the configuration? Or em I missing something?

 

Configuration != data. Some workflows save a lot of data. It would not be appropriate to put their data directories within the preferences bundle.

 

The only official way to sync workflow settings is via workflow variables. I've asked @Andrew before to provide an official sync data directory in the preferences bundle, but so far no joy.

 

What you can do, as long as you're careful not to put loads of data in there, is create another directory alongside your workflow's with the name my.bundle.id-data. So if your bundle ID is com.example.my-workflow, the syncing directory would be com.example.my-workflow-data. Because Alfred runs workflows with the workflow's own directory as the working directory, you can create/access this directory as ../com.example.my-workflow-data.


Alfred won't mind that it's there or that it isn't a valid workflow, and Dropbox (or whatever) will sync it along with everything else. And it won't get overwritten by a workflow update like your workflow's own directory does.

Edited by deanishe
Link to comment
  • vitor changed the title to [SOLVED] Advanced -> Set Preferences Folder affects location of Alfred.alfredpreferences only
  • 6 months later...

I am not an expert in technology and scripting but a big fan of Alfred and workflows: my "beginner" question about what it says below, quoting  Deanishe' post which I found as I searched on the blog "how to save, name my workflows in Alfred? Are you here offering a solution to save my new workflows and have them synced? What I don't know  is where to store my workflows in general, the ones copied from Alfred examples for instance. Because I rarely save them anywhere in particular and some just stay in my downloads: should they all be in my Alfred preferences folder? and am I right to say that in that post  you are explaining how to create another folder in sync with same Alfred? in that case should I use Dropbox (is it the best option?).For now my sync preferences  are in ICloud Drive: is it a good option?

Thank you so much for answering to those beginners' questions. quote of the post below: 

also I am adding the path of my workflow: is it wrong? it works though....

 

"Configuration != data. Some workflows save a lot of data. It would not be appropriate to put their data directories within the preferences bundle.

The only official way to sync workflow settings is via workflow variables. I've asked @Andrew before to provide an official sync data directory in the preferences bundle, but so far no joy.

What you can do, as long as you're careful not to put loads of data in there, is create another directory alongside your workflow's with the name my.bundle.id-data. So if your bundle ID is com.example.my-workflow, the syncing directory would be com.example.my-workflow-data. Because Alfred runs workflows with the workflow's own directory as the working directory, you can create/access this directory as ../com.example.my-workflow-data.
Alfred won't mind that it's there or that it isn't a valid workflow, and Dropbox (or whatever) will sync it along with everything else. And it won't get overwritten by a workflow update like your workflow's own directory does.

Edited August 26, 2019 by deanishe"

Screen Shot 2020-02-27 at 11.29.56.png

Link to comment
49 minutes ago, helwaser said:

Because I rarely save them anywhere in particular and some just stay in my downloads: should they all be in my Alfred preferences folder?

 

No. Once you've installed the workflow in Alfred, you can delete the .alfredworkflow file. It's the zipped workflow, an installer. When you double-click it, Alfred extracts it to your workflow directory and you don't need the .alfredworkflow file any more. There's little reason to keep it around, and zero reason to put it in your Alfred preferences folder, seeing as there's already a copy of it in there.

 

51 minutes ago, helwaser said:

For now my sync preferences  are in ICloud Drive: is it a good option?

 

No. Alfred's help explicitly advises against using iCloud. It is not reliable enough for Alfred's purposes and frequently causes problems, including losing users' entire preferences.

 

I can see from your screenshot that iCloud has already screwed something up.

 

53 minutes ago, helwaser said:

quote of the post below: 

also I am adding the path of my workflow: is it wrong? it works though....

 

That post is for workflow developers, not users.

Link to comment
9 hours ago, helwaser said:

Maybe one last short question: when I create a workflow, do I likewise don't need to save it afterwards?

 

No, not if you've created it in Alfred. Alfred automatically saves your workflow after every edit.

 

All of that said, you should still make sure you have a backup (Time Machine or similar), but that should go without saying.

Edited by deanishe
Link to comment
  • 1 month later...
On 8/26/2019 at 1:08 PM, deanishe said:

The only official way to sync workflow settings is via workflow variables. I've asked @Andrew before to provide an official sync data directory in the preferences bundle, but so far no joy.

 

Is there an open Feature Request post?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...