Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add Spotify now-playing plugin#12

Merged
himattm merged 3 commits intomainfrom
himattm/spotify
Jan 31, 2026
Merged

Add Spotify now-playing plugin#12
himattm merged 3 commits intomainfrom
himattm/spotify

Conversation

@himattm
Copy link
Owner

@himattm himattm commented Jan 31, 2026

Summary

  • Add new spotify plugin that displays currently playing Spotify track in the status line
  • Works on macOS (AppleScript) and Linux (playerctl)
  • Add configVersion field to track applied migrations, preventing re-application when users customize their config
  • Unify default sections with DefaultSectionLines() as single source of truth
  • Spotify defaults to second line in new installs

Features

  • Shows track info: ♫ Artist - Track Title (emerald when playing)
  • Paused state: ⏸ Artist - Track Title (gray, opt-in)
  • Configurable: show_icon, max_length, format, show_when_paused
  • Cache invalidation on idle hook for fresh data
  • Unicode-safe truncation

Config Migration

  • Fresh installs get spotify on line 2 by default
  • Existing users get spotify added via migration
  • configVersion prevents re-adding spotify if user removes it

Test plan

  • Unit tests for config parsing, output formatting, caching, hooks
  • Integration tests for macOS/Linux
  • Manual testing with Spotify running
  • Verified migration skipping works correctly

🤖 Generated with Claude Code

himattm and others added 3 commits January 30, 2026 18:43
- Display currently playing Spotify track in status line
- macOS support via AppleScript (single call for performance)
- Linux support via playerctl
- Configurable: show_icon, max_length, format, show_when_paused
- 3-second cache TTL with invalidation on idle hook
- Unicode-safe truncation for multi-byte characters

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add configVersion field to Config struct to track applied migrations
- Migrations now check configVersion instead of binary version, preventing
  re-application of migrations when users customize their config
- Unify default sections with new DefaultSectionLines() as single source
  of truth - spotify defaults to second line
- Install script now uses `prism init-global` instead of hardcoded JSON
- Add add_section() helper for migrations that add new plugins
- Bump version to 0.7.0

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@himattm himattm merged commit d3c5206 into main Jan 31, 2026
1 check passed
@himattm himattm deleted the himattm/spotify branch January 31, 2026 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant