I wasn't looking to create a specific work flow, per se, other than "type something in, get some results, pick one". Other projects try and create a very specific work flow (quicksilver being the grand daddy of them all), I opted for the Google-ish "a search line with results". There are strengths and challenges to both approaches, but I like the choice made in KRunner for general consumption purposes. Once can switch to a more work-flow defining mode in the configuration, however, by selecting the "Task oriented" user interface.
Since it's debut in the KDE SC4.0, KRunner has gotten a lot prettier, a lot faster, a lot more featureful and a lot more stable. It's a fairly healthy project in that regard. It's a multithreaded app that favours responsiveness, best seen in the as-you-type results, over CPU cycles (so there can be plugins running old queries that are no longer useful; KRunner just moves on instead of waiting for the to finish). The result is still very usable on low powered machines.
In KDE SC 4.4, the Runners (as KRunner's plugins are known) also power Kickoff's search and Plasma Netbook's Search and Launch activity page. Other apps can just as easily use them by linking to libplasma and using Plasma::RunnerManager.
Also new in 4.4 are support for actions-on-results in the default interface (the task oriented interface already had support for them in 4.3). They appear as little buttons attached to the respective entry, just like the configure button does. This feature uses the base work done by Ryan with Jacopo doing the UI integration into the default interace.
Jocopo's done a lot of other nice work for the 4.4 release as well, including "single runner mode" which allows a Runner to advertise that it's useful "all on its own". When it does so, with X-Plasma-SingleRunnerQueryMode in the .desktop file, one can launch KRunner with just that one runner active and an empty query box becomes synonymous with the default syntax the runner registers. Queries then get passed to just that one Runner, it's icon and name is shown in the user inteface to make this clear, and you can even set a global keyboard shortcut to bring up KRunner with a specific Runner in single runner mode. This is a really nice usage of the RunnerSyntax feature introduced in 4.3 for online help; in the apidox it is noted that RunnerSyntax might be used in the future to enable features that require knowing what a Runner is capable of, and with 4.4 we have the first application of that. Very cool.
There's also the new visual positioning of the KRunner window. While you can configure it to go back to the traditional "window floating in the middle of the screen" it now appears "glued" to the top of the screen. It plays well with top edge panels as well as applications like Yakuake (there's one top edge panel issue I still need to address before 4.4.0 is released, but there are a few months left for that to happen :), and you can move it by clicking and dragging inside the window or resize by clicking and dragging on an edge. When it's pushed into a corner, it removes the appropriate border of the window so it looks nice in such cases. The size and position are also stored and retrieved between sessions, and if you want to get it back to the center after messing around with it there's a "snap zone" in the center.
I have to admit it took me a day or two to get used to it popping out of the top of my screen after years of Alt+F2 causing a dialog to show up in the middle of my screen. With the adjustment period over (and it was quicker than I thought it might be), it feels so much more natural and is much more convenient when using KRunner to do things like unit conversions when reading a document, for instance, as the KRunner window now is now out of the way of the window. Pressing Alt-F2 a second time makes the window disappear when it is edge mounted, as well, which supports this kind of quick "check something" workflow nicely.
What isn't there is the ability to drag it to screen edges other than the top; that's probably something for 4.5. In fact, I'd like to get rid of the configuration option altogether for 4.5 and make it so that if you click-and-drag to move it and go more than X pixels from the screen edge it just pops off, and if you push it back up against a screen edge it just pops onto it. I just didn't have time to do this for 4.4; I was more concerned about getting the edge docking working nicely first. Next we can get fancy. :)
Speaking of fancy, the configuration is now embedded into the KRunner window. Dialogs-on-dialogs just sucks from a visual design perspective. There's one visual annoyance there right now, however, which I will fix for 4.4.0: the KRunner window should grow when the configuration is shown to give more room for it. The default size needed by it and a reasonable size for results is rather different. Separate windows sizes for each already works, I just need to make it automatically do this.
Of course, all this is nice and all but the real usefulness comes from what the Runner plugins themselves can offer. In addition to the usual stability, performance and feature improvements in KRunner itself, we've added some new Runners and improved on some of the existing ones. In the KDE Software Compilation v4.4 we will be shipping the following plugins for KRunner:
- KDE Workspace
- Bookmarks: supports both KDE's and Firefox's bookmarks in 4.4, depending on the default browser setting
- Calculator: still not as strong as I'd like; there were efforts to make it use libqalculate optionally (falling back to QtScript as the evaluator as it currently does), but nobody was able to confirm the thread safety of libqalculate
- Kill: kill -9 from KRunner! New in 4.4.
- Locations: network addresses, with some nice frills like automatically adding ftp or http depending on the domain name if a protocol wasn't provided
- Nepomuk Search: aka "Desktop Search" in the user interface, does what you'd expect
- Places - the places model known from Dolphin, the file dialog and kickoff, among other places (excuse the pun)
- Powerdevil: desktop style power management from a command line! :) This includes the ability to hibernate or sleep.
- Recent Documents
- Services: aka "Applications" in the user interface, it's what launches applications and plugins like control panels that are registered with the system using a .desktop file (same thing that populates the app launcher menus)
- Sessions: start new sessions, switch to existing ones, logout, shutdown and reboot
- Shell: launch shell commands, including the ability to do things like "run as different user" or "launch in a terminal window"
- Solid: Another new addition for 4.4, it lists storage devices allowing one to do what they might from the device notifier plasmoid in KRunner. What's really cool is that it uses the same Plasma::DataEngines as the widget, so code duplication is virtually non-existent.
- Web Shortcuts: access all those funky "gg:", "qt:", etc. shortcuts you know and love from Konqueror; as an added bonus, it opens the URL in your default web browser .. which means they now work in Aurora, Rekonq, Firefox, whatever as long as you type it into KRunner
- Windows: New in 4.4, this lets you switch between and manages virtual desktops and windows from KRunner's windows.
- Plasma Desktop
- Plasma Desktop Control: New in 4.4, it's the easy way to open the scripting console in plasma-desktop: desktop console
- Plasma Addons
- Audio Player Control: control any MPRIS enabled media player, which is most of the F/OSS ones. Defaults to looking for Amarok but can be configured to use different players. New in 4.4; it would be nice to see the need to configure it for the non-Amarok case removed or at least mitigated, though.
- Browser History: Return to where you've been in your browser history; speaking of which, I heard that rekonq has been using runenrs as well? If so, neat.
- Contacts: Search through your contacts and email them. Once Akonadi is in greater use (looks like contacts are there for 4.4) this should really be transitioned to use Akonadi; that will make this one a lot less of a performance hog.
- Converter: Convert units and currencies. Did you know that one carat is 0.0002 killograms? :) This uses libkunitconversion which joins KDE's Development Platform in kdelibs for 4.4
- Kate Sessions: Launch Kate sessions
- Konqueror Sessions: Launch Konqueror sessions
- Konsole Sessions: Launch Konsole sessions (a bit anti-climactic by now ;)
- Kopete: Control Kopete if it is running; go online and offline, set status messages, etc. It has code to do contact interaction, but right now Kopete's D-Bus interface isn't very amenable to this as it requires sending all the information over the wire to KRunner; so this support isn't compiled in by default for 4.4. When Kopete 2.0 comes out, we should be able to provide access to individual contact interaction features without penalty.
- Mediawiki: New in 4.4, Query mediawiki wikis. Adding a new wiki is just a .desktop file away, and we whip ones for Wikipedia, Wiki Travel, Techbase and Userbase, each appearing as a separate plugin in the configuration dialog even though they use the same plugin. That neat feature is available to any runner that would wish to do the same thanks to a clever little patch by Sebas.
- Spell Checker: Check your spelling quickly: alt+f2, spell <word>
Many more are possible, and some others are available on kde-apps.org. They can be written in C++, Python, Ruby or JavaScript (with limited functionality; I haven't yet gotten to fully expanding the JS bindings for Runners) and it would be great to see even more.
If you'd like to write one, be sure to visit the Creating Runners (C++) tutorial and find us on plasma-devel@kde.org.

20 comments:
The weird things is, to me it seems as if krunner is optimized to help users do stuff they don't do all that often, while I used the old minicli to quickly do things I do ten times a day -- sometimes more often.
I've never wanted to click or tab to one of the search results, I still try to cursor down in the completion combobox to the nearest textual match, and that fails if the hit isn't the top-most one, because as soon as that entry is hit, krunner searches again and removes the hit I was moving towards.
Probably it's just hide-bound me...
Im a 4.x user since pre 4.0 beta times, when almost nothing worked correctly.
Whenever you clicked somewhere, you expected a crash.
Unfortunately, KRunner is still in the same status for me. Whenever i open it, one of the following happens:
1) It crashes
2) It gives a few results on very first characters i type but when my search query is ended, i get no result or the older results stay there and dont go away.
3) I launch the proper result, then it crashes
4) It just works
Maybe this is due to the still-in-playground runners i have.
Although, I hope that these are just issues on my side, i'd love to see if others are having the same problems.
Beside that problem, the results are very nice. Now almost whatever you need, from a configuration, a song, an action, or whatever you need to do, you get the proper result from krunner.
Keep up improving it.
Nice to see that krunner is getting better and better. I just love this app:)
Here's just an other idea: I use krunner very often to find files (with nepomuk search). But there are two things that I sometimes miss:
*There is no possibility to drag and drop a file. So I can't for example search for a song and then d'n'd it into a media player.
*No right click option. So I can't do stuff like right-clicking a file to open it with an other app.
Or would this interfere with the idea of krunner??
@Boudewijn: what things did you use the old minicli to do that krunner doesn't?
"as if krunner is optimized to help users do stuff they don't do all that often"
it's not optimized for it, it's designed to be flexible. it's actually optimized to have quick access to applications, as it has the notion of "priority" plugins, which services and exec are.
while some of the runners may only be used sporadically, the idea is to provide a place that many things can be done, usually triggered with a key word. each bit of functionality is provided by a stand-alone plugin.
not wholey unlike the command line in that respect.
@Emil: if you haven't already, please report crashes.
we had issues in the past with dbus and with parts of kdelibs not being threadsafe. that's all gotten much better recently, though i'm sure there are still issues lurking for us to find.
as for queries ending up with no results, that's due to thread starvation. that should hopefully be addressed with 4.4; i used to see it on occasion myself by don't anymore after some changes in the code that address this.
more testing would be good, though, and there may yet be places to improve thread pool management.
as for items from playground, yes, those may or may not be stable.
@Christian: drag and drop is something i'd like as well; it's a little tricky but should be doable in a generic fashion without too much fuss.
as for right clicking, actions on results are now supported and those show up as extra buttons on the match. if the Nepomuk runner provided a "open with other app" action, it should Just Work in 4.4
What would be nice, too: Search in the Scrollback-Buffer (or at least the visible area) of konsole.
Hmm, or would it be too much text to search through and with this too many results?
> Since it's debut in the KDE SC4.0...
Are we using these terms retroactively now?
"There never was a K Desktop Environment. It's always been the KDE Software Compilation."
"We have always been at war with Eurasia. We've always been allies with Eastasia." :D
Another idea:
http://forum.kde.org/brainstorm.php#idea83704
@g121212: it could work, perhaps with a special trigger (e.g. , or : or something?). one could experiment with it and see how it 'feels'
Parker said...
"> Since it's debut in the KDE
Are we using these terms retroactively now?"
i think it makes sense to do so. it helps keep it clear through consistency when we're talking about how things are now mixed with things in the past.
personally, i wanted this rebranding to happen in tandem with 4.0. there wasn't the appetite for it then, but the reality is that the rebranding position describes what we've been doing since at least 3.0 if not even earlier.
@blindvic: completely possible with the current infrastructure, just need someone to write a patch for it. probably i, jacopo, ryan or someone like us will do so eventually, but if someone steps up it could happen sooner, e.g. for the 4.5 relase
Maybe I'm missing something but I have no idea where to find some help about a runner : on which keywords does it react and so on. It's the same with KWin plugins (I have seen there is some undocumented shortcuts in the Desktop Cube effect for exemple) and the usage of some plasmoids is not always easy to understand.
It could be usefull to have some kind of small help, maybe html based for those smalls plugins/apps (maybe an "tips/help plasmoid" that popup when needed ?)
Hi Aaron,
Having problems with auto-hide of the plasma toolbar (bugs reported 206978 & 205456)...any pointers on where I should look in the code... I'd like to try debug myself....
Ruairi
@DanaKil: "Maybe I'm missing something but I have no idea where to find some help about a runner : on which keywords does it react and so on"
click on the ? icon. It has a tooltip that says "Information on using this application. It will list all the keywords. We could also add this to the configuration dialog, but that would require additional integration with the KPluginInfoSelector that is used from kdelibs; haven't looked into that yet.
we can't use simple static html files because the keywords are often dynamic.
@Ruairi: that would be https://bugs.kde.org/201534
the problem most likely is the glow effect; that should be moved into kwin so that it doesn't have those kinds of side effects. if you turn off desktop effects and the problem goes away, then that is indeed the issue.
if the problem remains even with desktop effects off when there are full screen apps, then it's going to be a bit more difficult to resolve (though it really shouldn't be affecting anything at all in that case...)
the code in question is in kdebase/workspace/plasma/desktop/shell/ and is split between plasmaapp and panelview.
anyways, this belongs on plasma-devel@kde.org .. hopefully i'll see you there.
about the rekonq krunner "topic":
rekonq does not use runners/KRunner yet, but it is planned to integrate a KRunner like URL bar for 0.4.
The code can be found in the following branch on Gitorious:
http://gitorious.org/~jondeandres/rekonq/jondeandres-clone/commits/runners
@aaron: click on the ? icon. It has a tooltip that says "Information on using this application. It will list all the keywords.
Aah, all becomes clear(er). In a massive abuse of your blog comments, how about, when a search term is entered, limiting the help shown to those runners providing a match?
When will you fix completion or as-you-type results if you call it by that name? For example if one types:
"systemset", "logo", "switch u"
he would expect to see this results respectively:
"systemsettings", "logout", "switch user"
but no results are shown.
"Krunner is now powering kickoffs search"
Could I ask if you have updated krunner so that it detects when the kickoff menu changes?
That's one of the few things that I'm missing in krunner - if I change my kickoff menu with the menu editor, or if I install a new application, kickoff can find it when I start typing, but krunner won't.
If krunner now powers kickoff's search, won't that mean that now I won't be able to find it anywhere, without actually navigating to the random category where the application installs itself?
I hope this is something you've looked into, otherwise I think it's a bad idea to use krunner for kickoff searching.
"...and make it so that if you click-and-drag to move it and go more than X pixels from the screen edge it just pops off, and if you push it back up against a screen edge it just pops onto it..."
This I sould like to see for the panels. Imagine if you could just have panels floating around as a group of plasmoids, or imagine if a plasmoid automatically creates a new panel for itself, when you drag it onto a screenedge?
When I first read about plasma, I thought this would finally be possible. Being free to arrange my desktop on a natural way would be cool.
Krunner really rocks, I've completely disabled any "start menu" (kickoff, lancelot etc.) and I'm just using krunner when i need to run some application, cause I know what "types" of applications I've installed on my system even if I can remember the name exactly, and krunner really helps there cause I can type, for example "offi" and gett all the available openoffice and microsoft office (yeah, wine is great :P) programs.
Argh.
First off, thanks for the hard work, KDE is the most modern desktop on any OS.
But... does that mean the wheel *always* has to be reinvented? I can't help but wonder: wouldn't *all* Linux users have been better off if the effort spent improving Krunner were spent, say, improving (and abstracting) Do (as in Gnome-do) ? Ditto for Kwin effects vs. compiz plugins. I feel like having so much redundant effort weakens our community.
@B E A R 4 5 4: sometimes it is better to work on a common base, and when we can we do exactly that.
an example that i used recently was kobby/gobby/infinoted.
but sometimes it isn't less work, sometimes it doesn't result in better products and sometimes it's not plausible to reconcile various differences in requirements and goals.
in both of the cases you mentioned, it was more beneficial to write what was needed rather than try and adapt something else.
Post a Comment