← wiki

lastfm-widget

overview

A compact, always-on-top desktop widget that shows what's currently scrobbling on Last.fm. Y2K / Winamp aesthetic with a frosted glass skin and a user-selectable accent colour.

tech stack

Backend: Python 3.10+ with pywebview, running on WebKitGTK on Linux.

UI: HTML/CSS/JS rendered inside the pywebview shell — skins handled via skins.css, with a JSX-based widget variant also present in the repo.

Data source: Last.fm's user.getRecentTracks API, polled every 15 seconds (~10–20s real-world latency).

Requirements: a Last.fm account with scrobbling enabled, and a compositor (picom, Mutter, KWin, etc.) for the frosted-glass backdrop-blur effect — without one it falls back to a solid dark background.

features

Album art, track title, artist, and album name with a scrolling marquee title bar. A decorative spectrum visualizer. An accent-colour picker with 6 swatches, saved to localStorage. Windowshade behaviour — double-click the title bar to collapse to 21px. Drag the title bar to reposition.

The progress bar is an estimate only (Last.fm doesn't expose playback position), and the ♥ love button is visual-only in v1 — actual love/unlove requires session auth, planned for a future version.