Git Product home page Git Product logo

playctrl's Introduction

playctrl

Playctrl is a combination of a commandline tool and a chrome extension to enable you control Google Play (Music) from your desktop.

Playctrl is heavily inspired by playplay but was designed to be easier for users to install and run.

How it works

Playctrl consists of two pieces: the playctrl tool and a Chrome extension. The playctrl tool runs itself as a daemon and then sends the daemon commands via a unix domain socket. The Chrome extension listens for server send events from the server. The server just relays commands through.

Installation

Tool

You can download the tool prebuilt for your system (Mac OS or Linux, 64-bit only), at the following urls:

You will have to chmod +x the file after you've downloaded it, and put it somewhere in your $PATH.

Alternatively, you can build it yourself from a clone of this repo. You'll need to have Go (1.1+) installed. Just run make bin/playctrl and the binary will be at bin/playctrl.

If your Go environment is set up properly, you can use go get even more easily:

$ go get github.com/cespare/playctrl

Chrome Extension

You can download the Chrome extension from the Chrome store.

Usage

Once you've installed the playctrl tool and chrome extension, you'll need to reload Google Play so that the extension takes effect.

You can run, for example, playctrl playpause from the commandline to verify that it works.

You can explicitly run playctrl start-daemon to start the daemon. (You don't need to do this; playctrl launches the daemon the first time you run a command.) You can run playctrl stop-daemon if you want to make the daemon quit.

You'll want to hook up the shortcuts to global shortcuts in your operating system. For example, I use XFCE with Ubuntu, so in the Settings Manager I go to Keyboard -> Application Shortcuts and set playctrl playpause to the shortcut <Primary><Super>space (that is, ctrl-super-space).

On Mac OS X, you can create an Automator service and assign a keyboard shortcut.

The commands are:

  • previous
  • playpause
  • next
  • volumeup
  • volumedown

Developing

Build everything via make (you'll need Go and Coffeescript installed).

Run the tool with ./bin/playctrl. You can use -h to see the options. You can launch the server in the foreground with ./bin/playctrl daemon.

playctrl's People

Contributors

cespare avatar

Watchers

 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.