KRunner - Launcher for Plasma Desktop

KRunner is a desktop launcher from KDE. Its main function is to launch programs but it can be extended by runners to provide additional functionality. Some of the functionality includes search and open files, run shell commands, switch windows and desktops, search contacts and email, list bookmarks and open websites, search for music and control player, calculator and more.

KRunner

You can see list of all available runners by clicking on the ‘?’ icon in KRunner. Many commands take the search query as an input but you can also prefix them with an additional keyword to dispatch the query to a particular runner. For example define <search term> looks up a word in dictionary, device keywords lists all removable device which can be then mounted or ejected.

There is also appmenu runner that allows to search items in application menu having similar functionality like in Unity’s HUD or Mac’s application help menu search.

KRunner acts bit like a command shell. It remembers the commands you type and autocompletes them when you try to type the same query again. You can also see previous commands by using the up arrow key. You can switch between two styles.

Command oriented style shows all results in a single lists and available actions are shown as icons inside the result.

KRunner command oriented style

Task oriented style shows you two panes, one for items and one for the availble actions. You can select the action and item from a separate menu. This is similar to Quicksilver’s parameter selection.

KRunner command task oriented style

KRunner uses Baloo Framework as a backend for file search. Baloo indexes files and listens for changes so it can keep indexes up-to-date. Baloo replaced NEPOMUK’s semantic search mainly because of performance reasons.

Runner internals

There is a tutorial for developing a runner in python. Each runner has a metadata.desktop file describing the runner. The code returns an instance of AbstractRunner. It has match method for seaching and run to execute action when the item was activated by user.

Community plugins are submitted to KDE-Apps. Available plugins on the system are located in /usr/share/kde4/services/.

Future of KRunner

Architecture of KRunner is being changed for for KDE desktop 5. It has been split into two parts. First is the krunner framework which is a backend that can be used by different launchers. The second part is the KRunner UI which is part of Plasma Desktop. You can more about it here and here.