Jump to content

Any way to get persistent latching?


Recommended Posts

I want to map search terms to applications, so if I open Alfred and type `sa` I want it to open safari each and every time, not only if I've recently used `sa` to launch safari. In the preferences this is called "Top Result Keyword Latching". Is there a way I can make this permanent?

 

My issue is that I have a laptop I don't use very often, and when I return to it, these matches have been lost. I use alfred to switch applications instead of cmd-tab, and so it breaks my keyboard based workflow if I can't reliably know which shortcut to type to launch a specific application.

Link to comment
Share on other sites

And is there a timer for this latching? I find that on my often-used laptop, Alfred forgets my search terms for some consistently used items. For example I use deanishe's convert workflow always typing "co" then finding that and selecting it so I'm hoping "co" is now latched to convert, but if I haven't used it for a couple of weeks then it seems to have lost its latch and typing "co" the workflow is way down my search results again?

Link to comment
Share on other sites

Alfred's rolling knowledge lasts around a month, including any latching. If you use any items in Alfred's results during this time, the latching and weighting is refreshed, so that will last out a further month.

 

Here is a document I wrote to help better understand how Alfred ranks and latches results:

https://www.alfredapp.com/help/kb/understanding-result-ordering/

 

Even when Alfred's internal knowledge expires, he still uses underlying heuristics to do basic ordering (falling back to using a similar method to how Spotlight operates), so you should always get a somewhat satisfying result, even if Alfred hasn't built knowledge on your usage.

 

If there are more specific cases where latching isn't working outside of this one month window, let me know.

 

Note: for latching to work effectively for workflow filter's placeholders (e.g. list filters, script filters), they need to be set to argument optional or argument required.

Link to comment
Share on other sites

@Andrew thanks for the explanation and the link to the detailed article on result ordering.

 

Is there any way to ensure that latching persists indefinitely? Or put differently, is there any way to ensure that `sa` always has Safari as the first result no matter when the last time it was used?

Link to comment
Share on other sites

I do understand why Alfred wants a dynamic window by default. But I also have cases where I really want an ability to manually set the latch override. IIRC Quicksilver used to allow you to modify the weighting values assigned to entered values (you could set this dynamically within the floating window, no need for prefs etc.). But something as simple as "pinning" (using a key binding) would be enough?

Link to comment
Share on other sites

It's rare that people have asked for permanent latching, and in Alfred's eyes, if something hasn't been used in a month, it's better to retire that latch so that other results can assume it more easily. Having said that, I do see that it could be of use to some people.

 

I'll add a ticket internally and have a think about it once I get through the plethora of really quite exciting things which are in the works for Alfred 5.

 

I am also going to move this to Feature Suggestions to see if there is any other interest from other users.

 

Cheers,

Andrew

Link to comment
Share on other sites

  • 2 weeks later...

Thanks so much for considering this further @Andrew and good luck with all the other exciting features in the cooking pot!

 

Latching is quite a selective term, and I suspect some people do not link the reliability over time of mapping of terms to items with the concept of latching. I think "pinning" is a more general and potentially easier word to employ if this feature were to be refined in the future.

Link to comment
Share on other sites

  • 10 months later...

Hi @Andrew, I still find the rolling loss-of-latch the biggest issue I have using Alfred. As mentioned above I have a few core terms I really want to always "bind" to a result, things I use infrequently but want to always be prioritised. I keep my fingers crossed this is still floating somewhere in that cooking pot of yours!

Link to comment
Share on other sites

  • 5 months later...
On 7/21/2022 at 8:14 AM, Andrew said:

It's rare that people have asked for permanent latching, and in Alfred's eyes, if something hasn't been used in a month, it's better to retire that latch so that other results can assume it more easily. Having said that, I do see that it could be of use to some people.

 

I'll add a ticket internally and have a think about it once I get through the plethora of really quite exciting things which are in the works for Alfred 5.

 

I am also going to move this to Feature Suggestions to see if there is any other interest from other users.

 

Cheers,

Andrew

 

I must be neurodivergent because lack of permanent latching drives me absolutely insane and has for years. Please please Alfred gods, give us some kind of checkbox.

Link to comment
Share on other sites

I'm going to add a defaults write into the next build to extend the latching expiry to (rolling) 3 months instead of 1. A rolling 3 months of not using a latched keyword should be long enough for Alfred to decide it's no longer relevant.

 

A little more info as to why this can't be permanent: Unlike pinning, Alfred continually learns, adapts and latches, which forms part of the magic in Alfred's predictability. As such, the latching cannot grow indefinitely as this data is queried on every keystroke. You can imagine the bloat this could achieve after years of usage.

 

There is currently no timeline for the next build, but from that build onwards, the following terminal commands will extend the latching to 3 months:

 

defaults write com.runningwithcrayons.Alfred-Preferences longlatching 1
defaults read com.runningwithcrayons.Alfred-Preferences

 

Note: this may be removed if we receive any support queries from users which relate to performance and have blindly used this option. This is always the risk in adding this type of defaults write.

Link to comment
Share on other sites

Hi Andrew,

 

I'd be happy with a Workflow Keyword setting that always put it to the top, so there's no bloat.

 

See, I often have to abandon certain projects for months to do other things, and then when I come back to using certain sets of apps, Alfred has forgotten everything. The feeling I like to get from using Alfred is like driving a car where everything is in the right place. It makes my computer feel like a well oiled machine, but if suddenly the wrong app is opening, it kills that feeling.

 

Thanks!

Aaron

Link to comment
Share on other sites

Hi @Andrew -- thanks for this tweak, I'll definitely try it and see how it works. 

 

I understand the tension you have with latching duration, and I would still like to see something like "pinning" to give some terms special privilege, as you could do in Quicksilver. This means the algorithm still works as usual, but individual pinned items will override the latch expiry — this would overcome your issues with latching. This does require some sort of UI so I do understand it is a non-trivial feature request. The easiest is just a keyboard trigger, so lets say I type sn which I always want to be connected to the "Find your Snippets", when that is focussed in the Alfred window, then I press ⌘⌥P and that pairing is pinned. This would already really help without any further work, but the question is what happens if later I need to reassign sn; the easiest way would be I just focus a new entry and ⌘⌥P again. Perhaps a button to erase all pins to reset back to default?

Link to comment
Share on other sites

  • 2 weeks later...
On 11/16/2023 at 7:31 PM, iandol said:

Hi @Andrew -- thanks for this tweak, I'll definitely try it and see how it works. 

 

I understand the tension you have with latching duration, and I would still like to see something like "pinning" to give some terms special privilege, as you could do in Quicksilver. This means the algorithm still works as usual, but individual pinned items will override the latch expiry — this would overcome your issues with latching. This does require some sort of UI so I do understand it is a non-trivial feature request. The easiest is just a keyboard trigger, so lets say I type sn which I always want to be connected to the "Find your Snippets", when that is focussed in the Alfred window, then I press ⌘⌥P and that pairing is pinned. This would already really help without any further work, but the question is what happens if later I need to reassign sn; the easiest way would be I just focus a new entry and ⌘⌥P again. Perhaps a button to erase all pins to reset back to default?

I'm a fan of this. Or just a .txt file I can edit

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