Spotify panel applet for COSMIC Desktop / Pop!_OS — now playing, animated marquee, progress bar, and MPRIS media controls.
COSMIC™ Spotify tray · now playing · libcosmic · MPRIS · Linux panel applet
App ID: com.brunocasarotti.Cosmictify
License: MIT
curl -fsSL https://raw.githubusercontent.com/brunocasarotti/cosmictify/main/install.sh | bashInstalls into ~/.local (binary + desktop entry + icon).
From the latest release:
# download cosmictify_*_amd64.deb then:
sudo apt install ./cosmictify_*_amd64.deb- Settings → Desktop → Panel → Configure panel applets → Cosmictify
- Ensure Spotify desktop is running
- For the Spotify library like button (♥), see Enable the Like Button
User install (~/.local / one-liner / tarball):
curl -fsSL https://raw.githubusercontent.com/brunocasarotti/cosmictify/main/install.sh | bash -s -- --uninstallOr, from a downloaded tarball: ./install.sh --uninstall
Debian package:
sudo apt remove cosmictifyFrom source (dev):
just uninstall-localLaunching the executable directly from an IDE creates a standalone floating surface; popup
behavior depends on the real cosmic-panel host. To install an unstripped debug build with symbols:
just install-local-debugReload the applet from the panel, then use VS Code/CodeLLDB with request: "attach" and select the
corresponding cosmictify process. Use just install-local to restore the optimized release build.
- Panel tray: album cover + scrolling Title — Artist marquee + thin progress bar
- Popup: large artwork, seek, play/pause, next/previous, volume, open in Spotify
- Shortcuts: scroll = next/prev · middle-click = play/pause
- Spotify-only MPRIS (won’t hijack YouTube/browser players or thicken your top bar)
- Library like (♥) via personal Spotify Web API app (OAuth PKCE + Secret Service)
- Popup gear expands Spotify setup (Client ID + Connect / Disconnect) without cluttering the player UI
- Built with Rust + libcosmic for native COSMIC look & feel
MPRIS playback controls work without this setup and do not require Spotify Premium. The like button needs a one-time personal Spotify Developer app and OAuth.
Spotify Development Mode does not provide Cosmictify with one shared public app. Each user must create a personal Spotify Developer app because a Development Mode app supports at most five allowlisted users, and broader access has a high eligibility threshold. Personal use is fine: the app owner is automatically the owner account; additional test accounts must be added explicitly.
-
Sign in to the Spotify Developer Dashboard with the Spotify account that owns the app. The app owner currently needs an active Premium subscription.
-
Click Create app.
-
Enter a name such as
Cosmictify Personaland any description. -
Select Web API.
-
Add this exact Redirect URI:
http://127.0.0.1:43821/callbackDo not use
localhost, change127.0.0.1, change the port, or add/remove the trailing slash. -
Accept Spotify’s terms, then create/save the app.
-
Copy only the app’s Client ID into Cosmictify. The Client ID is a public identifier.
-
Never copy, share, or enter the Client Secret. Cosmictify does not request or store a Client Secret.
The app owner needs no extra allowlist entry. To test with other accounts, open the app’s Settings → Users Management in the Developer Dashboard and add them; Development Mode allows a maximum of five users in total.
With Cosmictify installed:
- Open the Cosmictify popup and click the gear icon (bottom-right) to expand Spotify setup.
- Paste the Client ID into the field (placeholder: Spotify Client ID).
- Choose Connect Spotify (saves the Client ID and starts authorization).
- Complete authorization in the system browser and approve the
user-library-readanduser-library-modifypermissions.
Cosmictify checks the current Spotify track and lets the heart button save or remove it from your Spotify library. The loopback callback is local to your computer; the browser must return to the exact URI above.
- The Client ID is stored in ordinary Cosmictify configuration because it is not a secret.
- OAuth access and refresh tokens are stored only in the Linux Secret Service (the desktop keyring), not in plain-text configuration. There is no plain-text fallback.
- MPRIS playback remains independent of Spotify Web API login, so a missing or unavailable keyring does not prevent normal local media controls.
- To disconnect, open the popup gear → expand Spotify setup and choose Disconnect. To switch Developer apps, change the Client ID and choose Connect Spotify again: Cosmictify clears tokens tied to the previous app so they cannot be reused with another Client ID.
- Invalid redirect URI: The Dashboard value must be exactly
http://127.0.0.1:43821/callback. Replacelocalhost, remove any trailing slash, and check the port before trying again. localhostor port conflict:localhostis not interchangeable with127.0.0.1for this setup. Close another process using port43821, restart Cosmictify, and retry the connection.- Keyring locked or unavailable: Unlock/start the Linux Secret Service in your COSMIC session and retry. Cosmictify does not write tokens to a plain-text fallback.
- 403 account, allowlist, or quota error: Confirm that the app owner has Premium, that the authorizing account is the app owner or one of the five Users Management entries, and that the app is configured for Web API.
- Authorization was revoked: Disconnect/reset the app connection, then choose Connect Spotify again and approve the requested library permissions.
- Client Secret requested: Stop—the setup is incorrect for Cosmictify. Only enter the Client ID; never expose the Client Secret.
- Pop!_OS 24.04+ with COSMIC desktop
- Spotify desktop client (MPRIS)
- Rust (asdf recommended) — see
.tool-versions - Build packages:
sudo apt install libdbus-1-dev pkg-config libssl-dev build-essential \
libxkbcommon-dev libwayland-dev libegl1-mesa-dev
cargo install justgit clone https://github.com/brunocasarotti/cosmictify.git
cd cosmictify
just build-release
just install-localjust uninstall-local # remove
just run # debug run
cargo test --release
just package # make dist/*.tar.gz and dist/*.debCosmictify talks to the Spotify desktop app over MPRIS on D-Bus (same family of APIs as playerctl). No Spotify Premium required for local play/pause/skip on the desktop client. See the design notes in plans/.
just release 0.3.0 # tag + GitHub release with tarball/debCI also builds on v* tags (.github/workflows/release.yml).
cosmic · cosmic-desktop · pop-os · spotify · mpris · panel-applet · libcosmic · rust · now-playing · linux-desktop · media-controls · system76
- pop-os/cosmic-applet-template
- pop-os/libcosmic
- Ebbo/cosmic-applet-music-player (generic MPRIS applet)
Daily-driver on Pop!_OS 24.04 COSMIC: MPRIS panel/popup plus optional Spotify library like via personal Developer app (v0.3.0: structured diagnostics, journald logging, and panel-hosted debug tooling).
Cosmictify writes structured logs to the current user's systemd journal. When journald is not available (for example, outside a normal desktop session), it falls back to compact stderr logs.
Follow the latest applet logs with just logs, or only warnings and errors with
just logs-warnings.
The default filter is warn,cosmictify=info. Override it for a single launch with the standard
RUST_LOG environment variable:
RUST_LOG=cosmictify=debug cargo run --releaseEach installed panel instance runs as a separate process. Startup and panel-context events include the PID and output name, so multiple monitors can be distinguished. To follow one instance after finding its PID:
journalctl --user _COMM=cosmictify _PID=12345 --follow --output=short-preciseLogs intentionally omit OAuth URLs, authorization codes, PKCE values, access and refresh tokens, Spotify Client IDs, track IDs, artwork URLs, titles, and artist names.
MIT © Bruno Casarotti