Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/robhurring/tmux-spotify
:notes: TPM plugin around spotify (OSX only)
https://github.com/robhurring/tmux-spotify
Last synced: 2 months ago
JSON representation
:notes: TPM plugin around spotify (OSX only)
- Host: GitHub
- URL: https://github.com/robhurring/tmux-spotify
- Owner: robhurring
- Created: 2016-03-16T02:08:58.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-03-03T21:54:47.000Z (11 months ago)
- Last Synced: 2024-08-05T06:06:39.678Z (6 months ago)
- Language: Shell
- Homepage:
- Size: 96.7 KB
- Stars: 81
- Watchers: 2
- Forks: 13
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tmux Spotify Plugin
Tmux plugin that shows the current music status for Spotify, Apple Music, or iTunes in your statusline.
Introduces the following new status variables:
* `#{music_status}`
* `#{artist}`
* `#{album}`
* `#{track}`### Usage
The following interpolations are made available for your statusline:
* `#{music_status}` - Spotify status icons
* `#{artist}` - Current artist
* `#{album}` - Current album
* `#{track}` - Current trackHere's the example in `.tmux.conf`:
```bash
set -g status-right "♫ #{music_status} #{artist}: #{track} | %a %h-%d %H:%M "
```Customize the icons with:
```bash
set -g @spotify_playing_icon ">"
set -g @spotify_paused_icon "="# optional: defaults to `paused_icon`
set -g @spotify_stopped_icon "X"
```By default, Spotify is used as the media source. iTunes or Apple Music can be used by setting `MUSIC_APP` in your `bashrc`:
```bash
# set tmux-spotify to use Apple Music instead of Spotify
export MUSIC_APP="Music"
```Set `MUSIC_APP` to `iTunes` instead on macOS Catalina.
If the `status-right` overflows when the music title is too long, you can increase the `status-right-length` by using the following line in `.tmux.conf`:
```bash
set -g status-right-length 70
```### Screenshots
![status](/screenshots/spotify-status.png)
### Installation with [Tmux Plugin Manager](https://github.com/tmux-plugins/tpm) (recommended)
Add the plugin to the list of TPM plugins in `.tmux.conf`:
```bash
set -g @plugin 'robhurring/tmux-spotify'
```Hit `prefix + I` to fetch the plugin and source it.
### Manual Installation
Clone the repo:
```bash
$ git clone https://github.com/robhurring/tmux-spotify ~/clone/path
```Add this line to the bottom of `.tmux.conf`:
```bash
run-shell ~/clone/path/music.tmux
```Reload the TMUX environment:
```bash
# type this in the terminal
$ tmux source-file ~/.tmux.conf
```