Feature
Render the current track's YouTube thumbnail as inline pixel art in the now-playing panel for terminals that support the Kitty graphics protocol or iTerm2 inline image protocol. Gracefully degrade to nothing (or ASCII block art) on unsupported terminals.
Why
Album art is the #1 most-requested feature across terminal music players (rmpc, kew, termusic all highlight it as a major differentiator). It transforms the now-playing panel from a text readout into something that feels like a real music player. tuitube already fetches YouTube metadata — the thumbnail URL is a free byproduct.
Terminal Support
| Protocol |
Terminals |
| Kitty graphics protocol |
Kitty, WezTerm, Ghostty |
| iTerm2 inline images |
iTerm2, WezTerm |
| Sixel |
mlterm, xterm with sixel, foot |
| Fallback |
All others — render nothing / small ASCII block |
Detection: check $TERM, $TERM_PROGRAM, and $KITTY_WINDOW_ID at startup.
Implementation sketch
- Fetch thumbnail URL from
https://i.ytimg.com/vi/{youtube_id}/mqdefault.jpg (160×90, always available)
- Resize to ~128×128 using
golang.org/x/image or github.com/disintegration/imaging
- Encode and write using Kitty protocol escape sequence (
\x1b_Ga=T,...\x1b\\) or iTerm2 (\x1b]1337;File=...)
- Render in a fixed region of the now-playing panel in Bubble Tea — use a
lipgloss box with fixed dimensions so layout doesn't shift when art is absent
- Cache the last N thumbnails to disk (
~/.cache/tuitube/thumbs/) to avoid re-fetching on skip-back
Files likely affected
internal/screens/nowplaying.go or equivalent now-playing view
- New
internal/art/art.go package for protocol detection + rendering
References
Feature
Render the current track's YouTube thumbnail as inline pixel art in the now-playing panel for terminals that support the Kitty graphics protocol or iTerm2 inline image protocol. Gracefully degrade to nothing (or ASCII block art) on unsupported terminals.
Why
Album art is the #1 most-requested feature across terminal music players (rmpc, kew, termusic all highlight it as a major differentiator). It transforms the now-playing panel from a text readout into something that feels like a real music player. tuitube already fetches YouTube metadata — the thumbnail URL is a free byproduct.
Terminal Support
Detection: check
$TERM,$TERM_PROGRAM, and$KITTY_WINDOW_IDat startup.Implementation sketch
https://i.ytimg.com/vi/{youtube_id}/mqdefault.jpg(160×90, always available)golang.org/x/imageorgithub.com/disintegration/imaging\x1b_Ga=T,...\x1b\\) or iTerm2 (\x1b]1337;File=...)lipglossbox with fixed dimensions so layout doesn't shift when art is absent~/.cache/tuitube/thumbs/) to avoid re-fetching on skip-backFiles likely affected
internal/screens/nowplaying.goor equivalent now-playing viewinternal/art/art.gopackage for protocol detection + renderingReferences