Ulauncher: Feature request: use extension without keywords

Created on 4 Oct 2018  Â·  11Comments  Â·  Source: Ulauncher/Ulauncher

Some extensions could be used without a trigger keyword, for instance:

  • system control: reboot, etc
  • media player control: play, pause, etc

This should be configurable by the user on a per extension basis, eg by setting the keyword empty.

As an example, rofi supports this (combi mode).

feature

Most helpful comment

I'd really wish you'd reconsider allowing extensions to work without keywords. What makes executables so special that they should be the only thing accessible without keywords ?

For example, I would like to access my bookmarks directly : I don't want to have to think about whether some webapp is an executable or a website every time I want to use it. I have resorted to adding Desktop files for the websites I visit most often, but I still often find myself typing the name of websites in ulauncher without prefix and then adding the prefix afterwards because ulauncher is not finding anything. I think this defeats the purpose of finding things as quickly as possible.

All 11 comments

Hey again,

I agree this would be at least a "nice-to-have". It could be used to allow unit and/or currency conversion unprefixed (similar to how Ulauncher implements the calculator now). In addition I have seen someone request unprefixed file search.

Your examples are not impossible to implement though. You could use multiple keywords instead (or add desktop entries if you don't need it it be an extension). I've done something similar here: https://github.com/friday/ulauncher-gnome-settings

Also, perhaps this issue could be clarified into one of either:

  1. Support extensions without arguments (that work like Apps)
  2. Support extensions without keywords (like the built in calculator)

I think this needs to be distinguished since the behavior and implementation details are very different. I also think 1 is more important and realistic, and also is what you want here?

I agree, also use case 1 can be subdivided into:

1.1. Extensions with a static set of keywords: eg player control, system control -> your workarounds apply (although it is not very comfortable having to fork every plugin to do this, so just creating desktop entries seems easier)
1.2. Extensions with a finite, but dynamic set of keywords: eg browser bookmarks, indexed IDE projects like this one

Use case 2 seems harder to implement to me without impacting performance, but I don't know how ulauncher communicates with extensions (threading ? asynchronism ?)

Extensions use websockets to communicate with Ulauncher, and the extensions are kept running in the background. Performance could still be an issue, but that's not the problem I was thinking of. Ulauncher has a specific flow. You either see the apps and keywords matching your input, or a result list from exactly one extension. Keywordless implies seeing apps in addition to multiple extensions results at the same time.

Extension preferences enables users to rename keywords. Having all of them in the manifest is needed for this. So I don't think adding keywords dynamically is a good idea. Adding a static set of keywords in the extension manifest and disabling dynamically if they can't be supported is better imo.

This could be used in a hashing extension if the corresponding algorithm for a keyword isn't supported by the system for example (I wanted to do this so this is not a hypothetical example).

To match a list of “things“ (like browser bookmarks, desktop apps, commands, files etc) I think 2. or using a wrapper keyword is the way to go. Keywords shouldn't be used for this. My extension is more of a hack to fill a void, than a good and valid use case to support.

@nicoulaj thanks for the feature request.

I'm planning to review priorities of all of them once we migrate to Python 3.

For simple commands such as reboot, play and pause, here's instructions for creating desktop entries: https://github.com/Ulauncher/Ulauncher/issues/191#issuecomment-457000841

I've gave this another thought, I would like to keep keywords mandatory for extensions.
If extension doesn't have a keyword, it means it's a simple executable.
Once #191 is implemented the problem can be easily solved with shortcuts.

If extension doesn't have a keyword, it means it's a simple executable.

I don't agree with the motivation. For example, the built in calculator doesn't have a calc keyword, but it's not a simple executable.

Fair enough on the decision though :+1: Too much flexibility is hard to manage, and this would definitely be a complex one to implement.

I'm trying to migrate from Kupfer, and this is proving a bit frustrating. In particular for file-search, and I'm used to using extensions that add to the search index. In particular, I have begun developing a Ulauncher plugin that allows searching notes stored in the Zim Wiki application, but its really awkward to have to type a keyword. Clearly Ulauncher and Kupfer have different underlying operating models, but if Ulauncher could support the ability to add items to its internal index, it would allow different kinds of behaviour that cannot currently be supported (and #191 doesn't help this).

I'd really wish you'd reconsider allowing extensions to work without keywords. What makes executables so special that they should be the only thing accessible without keywords ?

For example, I would like to access my bookmarks directly : I don't want to have to think about whether some webapp is an executable or a website every time I want to use it. I have resorted to adding Desktop files for the websites I visit most often, but I still often find myself typing the name of websites in ulauncher without prefix and then adding the prefix afterwards because ulauncher is not finding anything. I think this defeats the purpose of finding things as quickly as possible.

For example, I would like to access my bookmarks directly.

I totally agree with this. The best thing about the Albert launcher was exactly this behaviour, so intuitive and easy. It didn't matter if I wanted to open a website or a ssh connection. Isn't there any way to this?

Was this page helpful?
0 / 5 - 0 ratings