Jump to content

Ability to save and insert predefined Alfred objects


nikivi
 Share

Recommended Posts

There is macOS app called Keyboard Maestro that some of you have probably heard of.


The app similar to Alfred lets you create what are called macros that are built with a bunch of actions. Similar to how you can build workflows with a bunch of alfred objects.


Both apps also contain a library of predefined actions and objects that users can use. Like Alfred's script filter, Open URL and more.


Well, one person in this Keyboard Maestro community made this plugin :


https://forum.keyboardmaestro.com/t/macro-kmfam-favorite-actions-and-macros/4854


And what it allows you to do is extend this library of actions to also include actions that users have defined of their own.


In Alfred's terms. Such a plugin would allow you to create one action to make a script filter where the language would be already set to python instead of default bash, it would tick Alfred Filter results and then move mouse to the Script area so you can start writing your script. Or you can make an action to make an applescript with some preset code so all that is left for you to do is fill in some blanks.


And more than that, with that plugin, you actually get a dedicated spotlight window you can use to search through these actions or in case of Alfred personalised workflow objects. Something that Alfred solely lacking. Alfred is a powerful launcher where creating workflows you are forced to right click, choose buttons to press and click around.


What I propose is to really power up alfred workflow development so you can first of all, create workflow objects from a spotlight like window inside of alfred preferences. So you can fire it up with a hotkey, type scri like here :

 

59cd8f4fc1c41_2017-09-29at02_09.png.8f451c8ec2e1fc9d4cfb82eed3912d2f.png

 

And simply press enter to create your object. And do the same for any other object out there. I think it makes sense for a launcher to have a luncher based workflow too, in my opinion.


And if that can be done, you can take this a step further and extend it in some way so users can create their own objects and then let users search for those objects too. For example a user can create a OneUpdater object and instead of going to some workflow to grab the OneUpdater object to copy it and bring it to his new workflow, he can simply fire up the search, type OneUpdater and press enter. These features will bring workflow development to a whole new level as you both will have much faster access to workflow objects but you will also be able to extend your arsenal to workflow objects you like and use that Alfred does not come builtin with. Saving you time configuring these things from scratch every time.


I myself have my own version of this idea in place and I implement it with KM palettes. But I can't create a spotlight like window in Alfred as I don't have control over that.


In any way, I just wanted to bring this up as I think this can be seriously awesome if implemented. Although I understand that this is not an easy thing to add. Even if the benefits, in my opinion would be worth it.

 

Edited by nikivi
Link to comment
Share on other sites

10 hours ago, nikivi said:

Something that Alfred solely lacking. Alfred is a powerful launcher where creating workflows you are forced to right click, choose buttons to press and click around.

 

Honestly, how much time do you actually spend creating workflows?

 

10 hours ago, nikivi said:

much faster access to workflow objects

 

This simply isn't an issue. If the speed with which you can add elements to a workflow is ever a significant factor, you're almost certainly doing it wrong.

 

Ask the author of any well-made workflow what they spent their time on, and I guarantee they will tell you that >80% of the time was spent thinking.

 

Compare your original node-spam implementation of your "learn anything" workflow to the elegant and maintainable 3-node version that resulted from actually spending some time thinking about the problem first instead of skipping straight to doing.

 

10 hours ago, nikivi said:

extend your arsenal to workflow objects you like and use that Alfred does not come builtin with. Saving you time configuring these things from scratch every time.

 

Why don't you just keep them in a "My Workflow Elements" workflow from where you can copy them as needed?

Link to comment
Share on other sites

14 minutes ago, deanishe said:

Why don't you just keep them in a "My Workflow Elements" workflow from where you can copy them as needed?

 

I actually have something like this and it works quite well too.

 

14 minutes ago, deanishe said:

Ask the author of any well-made workflow what they spent their time on, and I guarantee they will tell you that >80% of the time was spent thinking

 

That's true and I don't deny that that's the biggest and most important part in doing anything. It's just I always forget where for example a JSON config is.

 

"Oh, its probably in utilities, yep second choice there."

 

Where as with a spotlight prompt I can just type the object I want to create." I guess I am quite spoiled by having spotlight like prompts everywhere. Again, this is just an idea. I implement my own version of this idea already. It's just that it has KM dependency to it. And I do have a spotlight prompt for it too with this.

 

And yeah that Learn Anything workflow is a pretty evident example of what doing first and thinking later can do. I am actually trying to make Alfred My Mind purely in Go with few script filters so I have full control over all actions and everything. It's quite hard though.

 

 

Edited by nikivi
Link to comment
Share on other sites

1 minute ago, nikivi said:

I am actually trying to make Alfred My Mind purely in Go with one script filter so I have full control over all actions and everything

 

You mean by passing variables back into the program rather than using Alfred's own actions?

Link to comment
Share on other sites

4 minutes ago, deanishe said:

You mean by passing variables back into the program rather than using Alfred's own actions?

 

Yes, that's the idea. 

 

The big reason is that I can show modifier actions as subtext like in go to subreddit workflow I shared : 

 

4HbflyC.png 

 

And fuzzy searching.

 

Oh and I hope it will be easier to maintain and modify it if it will be all in code. As this will be my most used workflow.

 

Oh and I am writing a parser for all these MindNode maps. So not only will I be grabbing and passing links from these maps but I can query some arbitrary text from any of the maps and get results. If I actually make that work, it would be genuinely insane.

Edited by nikivi
Link to comment
Share on other sites

2 minutes ago, nikivi said:

It's just I always forget where for example a JSON config is

 

Me, too, tbh.

 

I don't think an "add elements via a search box" feature is a good fit for Alfred workflows because they aren't simple lists, like KM macros are. There isn't an obviously good place to add the new element, which is why Alfred 3 no longer lets you add elements via a button.

Link to comment
Share on other sites

1 minute ago, deanishe said:

There isn't an obviously good place to add the new element, which is why Alfred 3 no longer lets you add elements via a button.

 

That's a good point. In my KM macros I put the objects under user's cursor. Alfred can do something like this too. And if user is outside of the alfred workflow area or hovering over another object, it could add the object next to the one being hovered over.

 

 

 

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
 Share

×
×
  • Create New...