Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add priority for list entries #78

Closed
abenz1267 opened this issue Feb 10, 2023 · 8 comments · Fixed by #84
Closed

add priority for list entries #78

abenz1267 opened this issue Feb 10, 2023 · 8 comments · Fixed by #84
Assignees
Labels
enhancement New feature or request

Comments

@abenz1267
Copy link

Hi,

i think it'd be good to have some form of control over the searching algorithm in form of priority. F.e. i've created https://github.com/abenz1267/hyproff and it lists Hyprland windows.

The "problem": if i have spotify open i'd like the spotify window entry to be in top, not the executable in $PATH.

Do you think this would make sense?

Regards

@j0ru
Copy link
Owner

j0ru commented Feb 13, 2023

Hey,
just to clarify your use case, are you using kickoff with both, the --from-stdin and --from-path option?
Would it be enough if you could define a bonus score for items that are read from a different source i.e. for --from-stdin or would you need a per entry priority?

More control over the search parameters is something I've wanted to build for a while, especially because there is quite an old issue regarding this #30

@abenz1267
Copy link
Author

abenz1267 commented Feb 13, 2023

Hi,

no, i'm just using --from-stdin. I use https://github.com/abenz1267/hyproff to provide whatever i need, but the sorting isn't always optimal.

Sorting/prioritizing needs to be specified by the provider and factored in by kickoff when searching.

Regards

@j0ru
Copy link
Owner

j0ru commented Feb 13, 2023

Okay, I think I understand now.

I'm a bit reluctant to change the format of the input because that could possibly break compatibility for people who included kickoff in their scripts, but I think a simpler approach would be to add a flag to respect the original ordering.

Cheers

@abenz1267
Copy link
Author

yeah, that could work as well i guess. I just have to sort the source then.

@j0ru
Copy link
Owner

j0ru commented Feb 13, 2023

Perfect, I'll probably have this implemented by the end of the week

@j0ru
Copy link
Owner

j0ru commented Feb 19, 2023

Documentation was added in #81, the solution is a bit different than initially planned, but I think it works better and should give you a more fine grained control

@abenz1267
Copy link
Author

The documentation is wrong though, you are using %base_score and not $base_score

@j0ru
Copy link
Owner

j0ru commented Feb 19, 2023

Dang it, yes of course 🤦‍♂️, I think I need another coffee.
Thanks for noticing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants