Jump to content

Hot-Reload changes to `prefs.plist`


Recommended Posts

Right now, as far as I can tell, Alfred has a file watcher running for all workflow's `info.plist` and reloads a workflow if the file has changed. This enables some more advanced workflows to dynamically "edit themselves".

 

From what it looks like, this hot-reloading mechanic is not in place for `prefs.plist`, though it would in my opinion my even more useful here than with the `info.plist`. Hot-reloading the `prefs.plist` would enable workflows to dynamically change settings for the user. One example is this feature request for Shimmering Obsidian workflow, which would allow the user to change which vault they want to control on the fly.

Link to comment
Share on other sites

@pseudometa Alfred doesn't currently support manually editing the prefs.plist, however he does provide some AppleScript to modify workflow configuration which ensures that this is done atomically during a workflow's lifecycle:

 

Screenshot 2024-06-19 at 10.59.28.png

 

You could also use the "reload workflow" AppleScript to force reload the workflow, which would also achieve what you're requesting.

 

Cheers,

Andrew

Link to comment
Share on other sites

Posted (edited)

Thanks for the quick reply!

 

iirc, the AppleScript-set-configuration method just modifies the variable during a given run. However, what I was looking for is to make a persistent change to a workflow configuration value, so that it also applies to subsequent runs.

 

Or does editing the `prefs.plist` and then reloading workflow accomplish that maybe?

edit: yes, editing the prefs.plist and reloading seems to do the trick!

Edited by pseudometa
Link to comment
Share on other sites

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...