GithubHelp home page GithubHelp logo

peterhajas / controlsurface Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 6 KB

A customizable control surface for a spare tablet / phone on your desk

License: BSD 2-Clause "Simplified" License

JavaScript 82.50% HTML 17.16% Shell 0.34%

controlsurface's Introduction

controlsurface

A control surface for a spare tablet / phone on your desk

controlsurface is a way to have controls on a tablet or phone that you keep on your desk.

The control surface is customizable. You can have any number of controls for toggling settings on your computer, launching apps, interacting with apps, controlling music, and more.

Controls are scripts that are run on your host machine. You can specify any script that you like. Tapping on the corresponding part of the control surface will trigger that script.

Configuration

controlsurface uses a config file in your home directory. You should call it .controlsurface.

This file contains two parts:

Controls

This is a list specified by the Controls heading. Each element in this list has the following elements:

  • Title - this should be the topmost entry in the control
  • command - the command to run. For example, "say hello"
  • short - a shortname-version of the Title
  • type - the type of control. Currently, only one-off controls (oneoff) are supported
  • keynum - a key for describing the position and size of the control. See Layout for more.

Here's a sample Controls section of a config file:

Controls:
    - Say Hello:
        command: say hello
        short: hello
        type: oneoff
        keynum: 1
    - Say Goodbye:
        command: say goodbye
        short: goodbye
        type: oneoff
        keynum: 2

Layout

Layout is the second section of the config file. It allows you to visually position your controls in a grid. Using ASCII graphics, you can (somewhat) easily move controls around. Here's an example Layout section:

Layout: >
    0000
    0112
    0002

Some notes about layout:

  • 0 means empty space
  • The layout grid can be however wide and tall you would like. Controls positioned within this grid will be aspect-fitted to fit the screen displaying them.

Example

An example config file can be found in example.controlsurface.

Getting Things Going

This has only been tested on OS X. You may need to run sh prepare.sh to get dependencies. I'm not super sure.

Once you do that, run it with node:

$ node controlsurface.js

A Note on Stability

controlsurface is still pretty young. It might delete all your stuff or order you a lot of pizza on accident.

License

For licensing, see license.md.

controlsurface's People

Contributors

peterhajas avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  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.