Jump to content

Selectively omit workflows from Sync


Recommended Posts

It would be very nice to be able to selectively sync certain workflows. I have Alfred on my primary machine (Mac Pro) and on my laptop. Due to very different storage configurations there are some paths that are just not the same between the new machines.

 

Example #1

 

When I try and launch Cheaters via Alfred even though the cheat docs are in my Dropbox folder in the same place, the path to the Dropbox folder is in a different place on my desktop vs. laptop. Initially I kept a snippet with the correct path for each machine and I'd just open the workflow and paste it in. It works but is slow. Because I'm a bit dim sometimes it didn't occur to me to use symbolic links on one of the machines so that the workflow works both places now. Still, it would be nice to be able to change the workflow on one machine and then just mark it as Do Not Sync anymore.

 

Example #2

 

As I've been writing this I was thinking of another use scenario. There are several workflows I want to be the same on both machines, but there are a bunch of workflows that I just don't need on my laptop. In those cases too it would be nice to not have sync be an all or nothing scenario. Just a toggle for Sync/NoSync

 

 

 

Link to comment
Share on other sites

It would be very nice to be able to selectively sync certain workflows. I have Alfred on my primary machine (Mac Pro) and on my laptop. Due to very different storage configurations there are some paths that are just not the same between the new machines.

 

Example #1

 

When I try and launch Cheaters via Alfred even though the cheat docs are in my Dropbox folder in the same place, the path to the Dropbox folder is in a different place on my desktop vs. laptop. Initially I kept a snippet with the correct path for each machine and I'd just open the workflow and paste it in. It works but is slow. Because I'm a bit dim sometimes it didn't occur to me to use symbolic links on one of the machines so that the workflow works both places now. Still, it would be nice to be able to change the workflow on one machine and then just mark it as Do Not Sync anymore.

 

Example #2

 

As I've been writing this I was thinking of another use scenario. There are several workflows I want to be the same on both machines, but there are a bunch of workflows that I just don't need on my laptop. In those cases too it would be nice to not have sync be an all or nothing scenario. Just a toggle for Sync/NoSync

 

If there is supporting documentation or supporting files for the workflow, then the workflow should be setup differently and show store supporting files in a different location. It is recommended in the workflows area that developers not store supporting data in the same folder with the workflow but to move that data off to local storage. This prevents sync issues, helps cut down on the amount of data that is synced back and forth, etc. So, unless I misunderstood the issue, this sounds like an issue for the workflow developer to handle.

Link to comment
Share on other sites

Thanks for the comments David. The more I think about this, it is a bit more tricky than I originally thought about it. Here's my thoughts for what they are worth:

 

I understand what you are saying, but there are a few things that work against that best practice. First, many scripts are something simple enough to be done in a few lines in the Script box. This is where the simplicity of Alfred works against itself because someone doing a quick script doesn't really think about best practices. They just write the script and it works. What's to think about?

 

Here's Brett's Cheaters workflow, and since the script is all in the Script box it lives inside the Alfred Sync folder. Unfortunately the script has a path to launch the Cheaters program on a user machine, so if the path to Cheaters is different on my laptop and desktop, the Workflow is broken on one or the other all the time. So while it is possible to do like your Weather workflow and have a file over in Application Support that only stores my zip code and doesn't get synced, either people don't know how to do that or it is too much trouble for a simple script. There is also the fact that for many workflows you'll want that information synced and having to set it twice is the hassle.

CHEATERS_DIR="file:///Users/aviris/Dropbox/cheaters/index.html"

TESTPATH=$(echo "$CHEATERS_DIR" | sed -e 's/file:\/\///')

if [[ -f $TESTPATH || $TESTPATH =~ "http://" ]]; then
	automator -i "$CHEATERS_DIR
{query}" Cheat.workflow
else
	echo "Cheaters path not valid"
fi

A quick check of my user Application Support folder supports this view since of all my installed workflows, only your Alfred Tweet, Recent Docs, Weather, and Tyler Eich's Colors are storing anything here. Everybody else seems to be keeping it all in the Alfred.alfredpreferences/workflow directory where it will sync. So even though it is recommended, it doesn't appear that many are doing it other than yourself.

 

Even if you could get everyone to write their workflows properly, it doesn't address the issue of the all or nothing sync. Maybe there aren't too many people in this situation, but I have many more workflows on my primary machine than I don't need/want on my laptop so a "Sync/Don't Sync" option would be nice. It would take care of both problems and allow the end user to "fix" things that the workflow creator should have done.

 

Hopefully that helps clarify my request. When I posted it I was thinking of it as a "would be nice" request (and below user selectable fonts if I'm honest). Now it is more of a contribution of use practices as you think about what to do with the syncing. The fact that for some workflows it makes sense to sync configuration data and for some it doesn't makes it a tough topic. 

Link to comment
Share on other sites

  • 1 year later...

Selective sync on workflows would be awesome!  Shortcut keys on macbook air that use numbers don't work with iMac number pad.  In other words:  Control + 1 for example is different on the two machines.

 

thanks for considering the idea. 

Link to comment
Share on other sites

  • 4 weeks later...

So while it is possible to do like your Weather workflow and have a file over in Application Support that only stores my zip code and doesn't get synced, either people don't know how to do that or it is too much trouble for a simple script. There is also the fact that for many workflows you'll want that information synced and having to set it twice is the hassle.

 

It's really not much more complicated to use the proper directory. Newer versions of Alfred provide the path as an environmental variable.

 

Keeping any user settings in the workflow itself is a bad idea: everything will disappear if you update the workflow.

 

At any rate, you can't have both (i.e. some workflows that sync their settings and others that don't depending on what the user wants).

 

I suppose Alfred could provide an additional data directory within the sync directory (I requested this a long time ago) and give users a checkbox that will switch the data directory from ~/Library to Dropbox, but there's no guarantee a workflow would respect it. The environmental variable is fairly recent, and many older workflows (or those using older workflow libraries) use hardcoded paths.

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