Jump to content
zjn0505

Pin one item on top and sort others?

Recommended Posts

Currently in Script Filter, I didn't assign uid to items, so they are arranged in the order of `add_item`.

 

Is there a way to pin one item on the first place and assign uid to others and enable auto-sort to them?

Share this post


Link to post
5 hours ago, zjn0505 said:

Is there a way to pin one item on the first place and assign uid to others and enable auto-sort to them?

 

Afraid not. If any items have UIDs, Alfred will apply its knowledge to them, and if it associates them with the entered query, will probably bump them to the top.

 

What exactly are you trying to achieve?

Share this post


Link to post
Posted (edited)

In my use case, I'm doing a tcpip connection to the ip address input as {query}, which is listed as the first item.
Also I will save the history of connections, and show them starting from the 2nd place. When those items are selected, it will start to connect as well.

It's the history section that I hope to utilize Alfred's auto-sort feature. Now, I just sort by the reading timestamp of last used from db.

Edited by zjn0505

Share this post


Link to post

Hmm. What I would probably do there is leave UIDs on as long as the user’s query isn’t a complete, valid IP address and turn them off as soon as it is.

 

So it first works as a query to filter the history using Alfred’s sorting, but if the query is a complete IP address, that’s shown as the top result (“do X with xx.xx.xx.xx”) while the history is shown below sorted by length of prefix match.

 

So if you enter “10.0.0.1”, “10.0.0.10” should be at least near the top where you can action it with CMD+<NUM>.

 

Not so good if you’ll have whole subnets in the history, I suppose.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...