Krunner - ArchWiki

# Krunner

From ArchWiki

This article or section needs language, wiki syntax or style improvements.

Reason: See Help:Style (Discuss in Talk:Krunner#)

This article or section needs expansion.

Reason: Article needs more information on this software. (Discuss in Talk:Krunner#)

## Quick draft on how to switch active windows using krunner

Plasma 5 doesn't contain default way to specify krunner search only by active window titles. Following approaches are used to work around this issue.

#### Full list of windows with search by titles

This approach will require xdotool.

1. Go to System Settings > Workspace > Shortcuts > Custom Shortcuts.
2. Create new Global shortcut -> Command/URL (by right click)
3. Tick the checkbox to the right of the name.
4. In Trigger tab select the desired key combination.
5. In Action tab type `/usr/local/bin/krunner-search-by-windows.sh`
6. Create file `/usr/local/bin/krunner-search-by-windows.sh` with the following content:

       #!/bin/bash
       qdbus org.kde.krunner /App querySingleRunner windows ""
       sleep 0.2
       xdotool type 'window '
       xdotool key "shift+BackSpace"

7. Make file executable and give run permission to all

       chmod a+x /usr/local/bin/krunner-search-by-windows.sh

Note the space after `window`.

Now you're able to get list of opened windows by specified shortcut and search by this list as you type;

#### Search by titles without full windows list

This approach is more limited but far less ugly.

1. Go to System Settings > Workspace > Shortcuts > Custom Shortcuts.
2. Create new Global shortcut -> D-bus Command (by right click)
3. Tick the checkbox to the right of the name
4. In Trigger tab select desired key combination
5. In Action tab insert following information:

      - Remote application : org.kde.krunner
      - Remote Object      : /App
      - Function           : querySingleRunner
      - Arguments          : windows ""

Categories:

- KDE
- Application launchers

Hidden categories:

- Pages or sections flagged with Template:Style
- Pages or sections flagged with Template:Expansion