Git Product home page Git Product logo

tmux-spotify's Introduction

tmux-spotify

A little script that is based heavily on a script from https://github.com/wandernauta

Use Case

This is to be used in your tmux status line. If you want full terminal access you will want to use Wander script for that. If can be found https://gist.githubusercontent.com/wandernauta/6800547/raw/db881a9100eb9b1e684c99962bde086a47ebcf08/sp

Configuration

There is one configuration option in the bash script. If you open it in your text editor, there is a variable on the top called CHAR_LENGTH. This variable will trim the song title if its too long.

Install

Download or clone this repo and copy the tmux-spotify file to a location in your PATH so tmux can access it. Then you will want to edit your tmux.conf and set the following

set -g status-right $(tmux-spotify both)

This will display a โ™ซ, the artist, and the title of the song

Screenshot of status bar

If you do not like the icon or the way it outputs, you can call other params

set -g status-right $(tmux-spotify artist)

or

set -g status-right $(tmux-spotify title)

tmux-spotify's People

Contributors

jrock2004 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

tmux-spotify's Issues

Song name hiding others elements of status bar

I think depending on the size of song name, it hides the other elements in the status bar, preview:

  • With both names (artist and title), it hides everything if the name is too big: image1

  • With the artist name only:
    image2
    And the normal is to stay like this:
    image3

Is there a way to fix it? Maybe, instead of hiding the things on the right side just take the space on the left side of the song name?
This is my statusbar lines in .tmux.conf:
set -g status-left "#[fg=colour161,bg=colour234,bold] #S โง‰ "
set -g status-right '#{?client_prefix,#[fg=colour75]#[reverse] @ #[noreverse],#[fg=colour1]} #[fg=colour197]#(~/tmux-spotify title) #[fg=colour233,bg=colour241,bold] %a,%b %d #[fg=colour233,bg=colour245,bold] ๐Ÿ•’ %H:%M '
Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.