A Spotify mini-player that lives inside cmux's sidebar.
Creates a dedicated Spotify workspace at the bottom of your cmux sidebar.
Sidebar — always visible while you code:
♫ Track - Artistin Spotify green (#1DB954) when playing⏸ Track - Artistin gray when paused- Progress bar showing playback position
- Marquee scroll when the song title is too long
Click into it — interactive TUI player:
- Track, artist, album display with progress bar
- Keyboard controls:
spaceplay/pause,nnext,pprevious,qquit
Automatically hides when Spotify is not running.
git clone https://github.com/stoneHee99/cmux-spotify.git ~/projects/cmux-spotifysh ~/projects/cmux-spotify/launch.shA "Spotify" workspace appears at the bottom of your cmux sidebar.
Add this to ~/.zshrc (or ~/.bashrc):
# cmux-spotify: auto-start Spotify workspace in cmux
if [ -n "$CMUX_WORKSPACE_ID" ] && ! pgrep -f spotify-tui.sh >/dev/null 2>&1; then
sh ~/projects/cmux-spotify/launch.sh >/dev/null 2>&1 &
fiNow every time you open cmux, the Spotify workspace is automatically created at the bottom.
| Key | Action |
|---|---|
space |
Play / Pause |
n |
Next track |
p |
Previous track |
q |
Quit player |
| OS | Method | Requirements |
|---|---|---|
| macOS | AppleScript (osascript) |
Spotify desktop app |
| Linux | playerctl (MPRIS/D-Bus) | playerctl, Spotify desktop app |
# Ubuntu / Debian
sudo apt install playerctl
# Arch
sudo pacman -S playerctl
# Fedora
sudo dnf install playerctllaunch.sh creates a cmux workspace running spotify-tui.sh, which does two things simultaneously:
- Updates the sidebar — calls
cmux set-statusandcmux set-progressevery second to show the current track and progress in the sidebar pill - Renders a TUI — draws an interactive player inside the workspace with progress bar and keyboard controls
Data is fetched using OS-native methods (AppleScript on macOS, playerctl on Linux) with a single call per cycle to minimize overhead. The display uses cursor repositioning instead of screen clearing to prevent flicker.
├── launch.sh # Creates the Spotify workspace in cmux
├── spotify-tui.sh # TUI player + sidebar updater
├── LICENSE
└── README.md
MIT


