Git Product home page Git Product logo

now-playing.widget's Introduction

Now Playing Widget

Motivation

I couldn't find any Übersicht widgets for Spotify that included the album's artwork so I decided to make one.

Inspired by long abandoned apps like Bowtie and CoverSutra, but focused solely on track information display, not control (I never really used those apps to control my media player).

Screenshots

Normal Display

Truncated & Resized

Alternate/Pinned Layout

Usage

Download ZIP archive to your Übersicht widgets folder (i.e. ~/Library/Application Support/Übersicht/widgets).

For alternate layout (pinned to the bottom of the screen, as seen in the third screenshot above), edit now-playing.coffee and just below style:, in line 59, change the alt-layout variable value to true (default is false).

Caveats

This is basically polling Spotify's API every time it updates so be gentle. I've set the default refresh rate to 5 seconds but I don't know how nice Spotify is with folks pulling a 640px cover every 5 seconds. I have definitely thought of implementing some sort of caching system but haven't decided how to tackle that issue... yet. :)

Disclaimer

I'm a hacker not a legit programmer (whatever that means). I reused & remixed bits and pieces from several sources. I have some experience with Bash and Javascript, but had never ventured into Coffeescript (though I use and love Ruby). I was pleasantly surprised and enjoyed using it but I might've made some crude mistakes in syntax or logic. Use this at your own risk... :P

Acknowledgements

I initially started by customizing Patrick Pan's Last.FM widget but then decided to move away from using Last.FM and finding ways to pull the information directly from the Spotify app and Spotify's API. But I definitely think Patrick deserves the above acknowledgement for having designed the structure that I reused and remixed in the making of this widget.

Contributing

If you have ideas for improvements and, especially, fixes, please open a PR and I'll definitely consider them. I do appreciate your help in advance.

TODO

now-playing.widget's People

Contributors

levifig avatar davidlday avatar

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.