A beautiful and feature-rich Plasma widget that displays your Spotify queue with enhanced auto-authentication and extended session persistence.
β¨ Enhanced Authentication
- π Automatic code extraction from redirect URLs
- πΎ Extended session persistence
- π Proactive token refresh to maintain longer sessions
- π‘οΈ State parameter verification for enhanced security
π΅ Queue Management
- π View your entire Spotify queue (up to 50 tracks)
- π Auto-refresh every 15 seconds
- β‘ Real-time queue updates
- π¨ Modern, beautiful UI with Spotify's signature green color
π Security & Privacy
- Tokens stored securely in KDE's configuration system
- OAuth 2.0 authentication with CSRF protection
- No third-party services or data collection
- KDE Plasma 6 (or Plasma 5.27+)
- Spotify account (Premium required for queue access)
- Spotify Developer App credentials (Client ID and Secret)
-
Clone or download this repository:
git clone https://github.com/Raindancer118/plasma-spotify-queue.git cd plasma-spotify-queue -
Run the installation script:
./install.sh
The script will:
- Detect your Linux distribution automatically
- Install required dependencies (optional)
- Install the widget to your user directory
- Restart Plasma Shell (optional)
The install script supports all major Linux distributions:
- Debian/Ubuntu (Ubuntu, Linux Mint, Pop!_OS, Elementary OS, etc.)
- Fedora/RHEL (Fedora, CentOS, RHEL, etc.)
- Arch Linux (Arch, Manjaro, EndeavourOS, Garuda, etc.)
- openSUSE (openSUSE Leap, Tumbleweed, etc.)
- Other distributions with KDE Plasma 6
If you prefer to install manually:
-
Copy the widget files to your local plasmoids directory:
mkdir -p ~/.local/share/plasma/plasmoids/com.spotify.queue-working cp -r contents ~/.local/share/plasma/plasmoids/com.spotify.queue-working/ cp metadata.json ~/.local/share/plasma/plasmoids/com.spotify.queue-working/
-
Restart Plasma Shell:
plasmashell --replace
- Go to Spotify Developer Dashboard
- Log in with your Spotify account
- Click "Create an App"
- Fill in the app details:
- App Name: Any name you like (e.g., "Plasma Queue Widget")
- App Description: Any description
- Redirect URI:
https://example.com/callback(important!)
- Save the app and note your Client ID and Client Secret
- Right-click on your desktop or panel
- Select Add Widgets...
- Search for "Spotify Queue"
- Drag and drop it to your desktop or panel
- Right-click the widget and select Configure Spotify Queue...
- Enter your Client ID and Client Secret
- Click Apply or OK
- Click the Get Code button in the widget
- Your browser will open to Spotify's authorization page
- Log in and authorize the app
- After authorization, you'll be redirected to a page that shows an error (this is expected!)
- Copy the entire URL from your browser's address bar
- Paste the URL into the widget's text field
- The widget will automatically extract the authorization code
- Click Submit or press Enter
The widget will now display your Spotify queue! π
Once authenticated, the widget will automatically:
- Display your current Spotify queue
- Show track names, artists, albums, and durations
- Auto-refresh every 15 seconds
- Maintain your session across restarts
Click the Refresh button at the top of the widget to manually update the queue.
Click the Disconnect button to clear your authentication and start over.
This error occurred in older versions of the widget. This has been fixed in version 6.2 and later. If you still see this error:
- Update to the latest version
- Run the install script again
- Restart Plasma Shell
Queue access requires a Spotify Premium subscription. Free accounts cannot access the queue API.
The widget now includes proactive token refresh to maintain longer sessions. If you still experience issues:
- Ensure you're using version 6.2 or later
- Check that your Client ID and Secret are correct
- Try disconnecting and reconnecting
- Make sure you restarted Plasma Shell after installation
- Try running:
plasmashell --replace - Check the widget is installed:
ls ~/.local/share/plasma/plasmoids/
If automatic code extraction fails:
- You can manually copy just the code part from the URL
- Look for
code=in the URL and copy everything after it (until the next&) - Paste just the code into the widget
To remove the widget:
rm -rf ~/.local/share/plasma/plasmoids/com.spotify.queue-working
plasmashell --replaceContributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Built for KDE Plasma 6
- Uses Spotify Web API
- Inspired by the need for a native Spotify queue viewer on Linux
If you encounter any issues or have questions:
- Open an issue on GitHub
- Check the Spotify API Documentation
- β Fixed QtGraphicalEffects compatibility issue with Plasma 6
- π¨ Removed decorative shadow effects for better compatibility
- π¦ Added automatic installation script
- π Added comprehensive README
- π Auto-extraction of authorization codes from URLs
- π Proactive token refresh for extended sessions
- πΎ Enhanced session persistence
- π‘οΈ State parameter verification
- β‘ Reduced re-authentication needs
Made with β€οΈ for the KDE Community
