Control Spotify directly from KRunner using simple commands prefixed with sp. This plugin uses Spotipy to interact with the Spotify Web API, allowing you to control Spotify playback on any device - your phone, Chromecast, Smart TV, or computer - all from your KDE desktop.
- Universal Control: Control Spotify on any device connected to your account
- Prefix-based Commands: All commands start with
spfor easy access (e.g.,sp play,sp next) - Rich Functionality: Play songs, control playback, manage playlists, adjust volume, and more
- Search Integration: Search for songs, artists, playlists, podcasts, and episodes
- Queue Management: Add tracks to your queue on the fly
- Clone the repository:
git clone https://github.com/JochemKuipers/krunner-spotify
cd krunner-spotify- Run the install script:
sh install.shThe installer will create a virtual environment and install all required dependencies automatically.
- Configure KRunner Priority (Recommended):
- Open KRunner settings (search for "KRunner" in System Settings)
- Go to the "Plugins" section
- Find "KRunner Spotify" in the list
- Add it to your Favorites and move it to the top of the favorites list
- This ensures Spotify results always appear first when using the
spprefix
Important
Required before first use. The plugin needs a Spotify Developer app to authenticate with the Spotify Web API.
- Go to the Spotify Developer Dashboard and log in
- Click Create app
- Fill in any name/description, then under Redirect URIs add:
http://127.0.0.1:3000/callback - Under APIs used, select Web API
- Save the app, open its settings, and copy the Client ID
- Paste it into
~/.config/KRunner-Spotify/KRunner-Spotify.configunder[Settings]:CLIENT_ID = your_client_id_here
Note
As of February 2026, Spotify limits developers to 1 app in development mode. If you already have an existing Spotify app (e.g. for Home Assistant), you can reuse it — just add your loopback callback URL as an additional Redirect URI rather than creating a new app.
Navigate to the repository directory and run:
sh uninstall.shAll commands must be prefixed with sp (e.g., sp login, sp play Bohemian Rhapsody).
- First time setup - authenticate with Spotify:
sp login
- Play music:
sp play <track name>
sp song <search query>
sp artist <artist name>
sp playlist <playlist name>
To run the plugin in debug mode and see console output:
sh debug.shThe configuration file is located at ~/.config/KRunner-Spotify/KRunner-Spotify.config. You can edit it directly or use:
sp editconfig
Plugin results have low priority:
- Open KRunner settings in System Settings
- Add "KRunner Spotify" to Favorites
- Move it to the top of the favorites list
- This ensures
spcommands always show results first
Plugin not appearing:
On systems using dbus-broker (common on Arch and CachyOS), newly installed D-Bus service files are not picked up until the broker is reloaded or you log out and back in:
systemctl --user reload dbus-broker.service
pkill -9 -f KRunnerSpotify.py
kquitapp6 krunnerThen open KRunner again and try a command such as sp play.
Note: debug.sh runs the plugin directly in the foreground; that bypasses D-Bus activation. After you stop it, KRunner relies on D-Bus to start the plugin on demand — which only works if the service file is registered (see above).
Distributed under the GPL-3.0 License. See LICENSE for more information.
Original project by Martijn Vogelaar
Maintained and updated by Jochem Kuipers
Project Link: GitHub
- Playback Control: Play, pause, resume, next, previous, shuffle, repeat
- Search & Play: Songs, artists, playlists, podcasts, episodes
- Queue Management: Add tracks to queue
- Volume Control: Increase, decrease, or set specific volume levels
- Track Information: View current track details
- Advanced: Fast forward, rewind, seek to specific time
- Configuration: Edit config, reload settings, login/logout
- Control your own playlists
- Create
- Delete
- Rename
- Add (current) song to playlist
- Search and play album by name
- Search and play album by artists name
- Play an artist besides just searching for songs by artist.
Distributed under the GPL-3.0 License. See LICENSE for more information.
Martijn Vogelaar - jochem@kuipers.cc
Project Link: GitHub