{"id":46026887,"url":"https://github.com/spywhere/tmux-now-playing","last_synced_at":"2026-03-01T03:07:28.829Z","repository":{"id":41375463,"uuid":"384930760","full_name":"spywhere/tmux-now-playing","owner":"spywhere","description":"Add music player with music control through key bindings to tmux","archived":false,"fork":false,"pushed_at":"2024-07-29T06:19:30.000Z","size":92,"stargazers_count":29,"open_issues_count":6,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-07-29T07:43:13.976Z","etag":null,"topics":["tmux","tmux-plugin","tmux-plugins"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spywhere.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-11T11:26:33.000Z","updated_at":"2024-07-29T07:43:14.028Z","dependencies_parsed_at":"2024-03-24T06:19:49.978Z","dependency_job_id":"bd56e4f4-2da9-42ef-9810-52dce98a1be0","html_url":"https://github.com/spywhere/tmux-now-playing","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/spywhere/tmux-now-playing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spywhere%2Ftmux-now-playing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spywhere%2Ftmux-now-playing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spywhere%2Ftmux-now-playing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spywhere%2Ftmux-now-playing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spywhere","download_url":"https://codeload.github.com/spywhere/tmux-now-playing/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spywhere%2Ftmux-now-playing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29959284,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T01:47:18.291Z","status":"online","status_checked_at":"2026-03-01T02:00:07.437Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["tmux","tmux-plugin","tmux-plugins"],"created_at":"2026-03-01T03:07:27.605Z","updated_at":"2026-03-01T03:07:28.814Z","avatar_url":"https://github.com/spywhere.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tmux-now-playing\n\nShowing currently playing track in tmux status bar with music controls\n\n![Screenshot](https://raw.githubusercontent.com/spywhere/tmux-now-playing/master/images/screenshot.png)\n\n## Integrations\n\n- (macOS only) `osascript` (AppleScript) - enable the following integrations and more in the future\n  - Spotify\n  - iTunes / Music\n- (Windows through WSL only, experimental) `cscript` (Windows Script Host) - enable the following integrations and more in the future\n  - iTunes\n- (Linux) [`playerctl`](https://github.com/altdesktop/playerctl) - services or apps that support the [MPRIS](https://specifications.freedesktop.org/mpris-spec/latest/) specification, such as\n  - Spotify\n  - YouTube Music (under Firefox or Chrome)\n  - VLC\n- `mpd` ([Music Player Daemon](https://www.musicpd.org)) through `nc` (netcat)\n- [Cider](https://cider.sh) through `curl` and `jq`\n- [`nowplaying-cli`](https://github.com/kirtan-shah/nowplaying-cli)\n\n## Configurations\n\nUse `#{now_playing}` in `status-left` or `status-right` to show a currently\nplaying track in supported music player\n\n### Status Format\n\n- `@now-playing-status-format`  \nDescription: An interpolated string with components to show for `#{now_playing}`\ncomponent  \nDefault: `{icon} {scrollable} [{position}/{duration}]`  \nValues: string with components\n- `@now-playing-scrollable-format`  \nDescription: A scrolling interpolated string with components for `{scrollable}`\ncomponent (see scrollable component section below for more details)  \nDefault: `{artist} - {title}`  \nValues: string with components\n- `@now-playing-scrollable-threshold`  \nDescription: A maximum number of characters in a component before it will be\nturned into a scrolling one  \nDefault: `25`  \nValues: number of characters\n- `@now-playing-playing-icon`  \nDescription: A string to display for `{icon}` component when the music player\nis playing  \nDefault: `\u003e`  \nValues: string\n- `@now-playing-paused-icon`  \nDescription: A string to display for `{icon}` component when the music player\nis paused  \nDefault: ` ` (empty space)  \nValues: string\n- `@now-playing-stopped-icon`\nDescription: A string to display for `{icon}` component when the music player\nis stopped (supported by AppleScript and cscript players)\nDefault: `` (empty string)\nValues: string\n- `@now-playing-idle-icon`\nDescription: A string to display for `{icon}` component when there is no music player running\nDefault: `` (empty string)\nValues: string\n- `@now-playing-keytable`  \nDescription: A string that is bound in the key table for combinating keys.  \nDefault: `prefix`  \nValues: string\n\n### Key Bindings\n\n- `@now-playing-play-pause-key`  \nDescription: A list of key to bind as a play/pause command  \nDefault: `,`  \nValues: space separated string\n- `@now-playing-stop-key`  \nDescription: A list of key to bind as a stop command  \nDefault: `.`  \nValues: space separated string\n- `@now-playing-previous-key`  \nDescription: A list of key to bind as a previous track command  \nDefault: `;`  \nValues: space separated string\n- `@now-playing-next-key`  \nDescription: A list of key to bind as a next track command  \nDefault: `'`  \nValues: space separated string\n\n### Update Interval\n\n- `@now-playing-auto-interval`  \nDescription: A string indicated whether to have plugin automatically adjusted\nthe refresh interval based on the music player state  \nDefault: `no`  \nValues: `yes` or `no`\n- `@now-playing-playing-interval`  \nDescription: A number of seconds to refresh when the music player is playing  \nDefault: `1`  \nValues: number\n- `@now-playing-paused-interval`  \nDescription: A number of seconds to refresh when the music player is paused  \nDefault: `5`  \nValues: number\n\n### Music Player\n\n- `@now-playing-mpd-host`  \nDescription: An IP address to MPD server  \nDefault: `127.0.0.1`  \nValues: string\n- `@now-playing-mpd-port`  \nDescription: A port number of MPD server  \nDefault: `6600`  \nValues: number\n- `@now-playing-cider-host`  \nDescription: An IP address to Cider web server  \nDefault: `127.0.0.1`  \nValues: string\n- `@now-playing-cider-port`  \nDescription: A port number of Cider web server  \nDefault: `10767`  \nValues: number\n- `@now-playing-cider-token`  \nDescription: An API token for Cider web server  \nDefault: `` (empty string)\nValues: string (leave empty for no token)\n- `@now-playing-nowplaying-cli-include-music-app`  \nDescription: A boolean string to indicate whether to have Apple's Music app\nprocessed through nowplaying-cli (which is quite flaky) or not  \nDefault: `no`  \nValues: `0` / `no` / `false` / `1` / `yes` / `true`\n\n#### Components\n\n- `{icon}` A string from `@now-playing-playing-icon`,\n`@now-playing-paused-icon`, `@now-playing-stopped-icon`, or\n`@now-playing-idle-icon` depends on the music player state\n- `{scrollable}` A scrolling interpolated string from\n`@now-playing-scrollable-format` (see scrollable component section below for more details)\n- `{title}` (Scrollable) A track title\n- `{artist}` (Scrollable) A track artist\n- `{position}` A playing position in `mm:ss` format with zero-padded\n- `{position_sec}` A playing position in seconds\n- `{duration}` A track duration in `mm:ss` format with zero-padded\n- `{duration_sec}` A track duration in seconds\n- `{percent}` A playing position in percent (without percent sign)\n- `{app}` A music player name\n\n#### Scrollable Components\n\nWhen specific component is too long to display (per\n`@now-playing-scrollable-threshold` value), it will turned itself into a\nscrolling one. This scrolling will be padded with 3 spaces and based on the\nplaying position of the current track.\n\nIf a component is not exceeding the threshold, it will simply be a static one.\n\nSo if the threshold is set to `10` and a song name is `This is too long`, a\n`{title}` component will be shown as...\n\n```\n[00:00] This is to\n[00:01] his is too\n[00:02] is is too \n[00:03] s is too l\n[00:04]  is too lo\n[00:05] is too lon\n...\n[00:09] oo long   \n[00:10] o long   T\n[00:11]  long   Th\n[00:12] long   Thi\n```\n\nNow, if all scrollable component in the `{scrollable}` component is exceeding\nthe threshold, the whole `{scrollable}` component itself will be expanded and\nturned into a scrolling one instead.\n\n## Key Bindings\n\nThese are default key bindings, you can configure your own key bindings by refer\nto the configuration section above\n\n- `\u003cPrefix\u003e+,` Play/Pause\n- `\u003cPrefix\u003e+.` Stop\n- `\u003cPrefix\u003e+;` Previous track\n- `\u003cPrefix\u003e+'` Next track\n\n## Installation\n\n### Requirements\n\nPlease note that this plugin utilize multiple unix tools to deliver its\nfunctionalities (most of these tools should be already installed on most unix systems)\n\n- `sed`\n- `grep`\n- `cut`\n- `awk`\n- `uname`\n- `wc`\n\n### Using [TPM](https://github.com/tmux-plugins/tpm)\n\n```\nset -g @plugin 'spywhere/tmux-now-playing'\n```\n\n### Manual\n\nClone the repo\n\n```\n$ git clone https://github.com/spywhere/tmux-now-playing ~/target/path\n```\n\nThen add this line into your `.tmux.conf`\n\n```\nrun-shell ~/target/path/now-playing.tmux\n```\n\nOnce you reloaded your tmux configuration, all the format strings in the status\nbar should be updated automatically.\n\n## Troubleshoots\n\n### Playing status is not update\n\nFirst, locate the temporary directory that use for storing caches by running\n\n```\necho \"${TMPDIR:-${TMP:-${TEMP:-/tmp}}}\"\n```\n\nIf the temporary directory located above does not exists, try checking on `~/.tmp`.\n\nThen remove all the files under `tmux-now-playing-XXX` where `XXX` is any number.\n\nThis should remove all the caches which plugin will regenerate itself when needed.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspywhere%2Ftmux-now-playing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspywhere%2Ftmux-now-playing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspywhere%2Ftmux-now-playing/lists"}