Giter Site home page Giter Site logo

streamdeck-examples's Introduction

Build Status Go Report Card MIT license GoDoc

This repository contains a demo application with several examples on how the golang streamdeck driver could be used.

Install

You can either grab a copy of the pre-compiled binary from the releases page or compile the program locally on your machine.

$ mkdir -p $HOME/go/src/github.com/dh1tw && cd $HOME/go/src/github.com/dh1tw
$ git clone https://github.com/dh1tw/streamdeck-examples.git
$ cd streamdeck-examples
$ go build
$ ./streamdeck-examples

This is a demo application for the golang streamdeck driver

Usage:
   [command]

Available Commands:
  enumerate   enumerate all connected Stream Decks
  help        Help about any command
  icons       place a bunch of icons on the streamdeck
  labels      show a bunch of labeled icons on the streamdeck
  ledbuttons  show a bunch of buttons with status LED
  pages       Custom nested pages with navigation
  slideshow   picture slideshow across all buttons
  textbuttons just buttons with custom text

Flags:
  -h, --help   help for this command

Use " [command] --help" for more information about a command.

Include static assets in binary

To include the no-golang files like images and fonts you need to install and run Mark Bates awesome pkger.

$ go get github.com/markbates/pkger/cmd/pkger

Then just run pkger in the root folder of this repository. pkger will create the pkged.go file which includes all the assets.

Examples

Enumerate

As one would expect, this examples enumerates all connected Stream Deck devices.

$ ./streamdeck-examples enumerate

Found 1 Elgato Stream Deck(s):
        SerialNumber:        AL37G1A00424

Icons

The icons example loads from different file formats (jpg, png, gif). The icons are placed on the first row of the Stream Deck. The lightbulb icon on button 0 (upper right corner) can be toggled.

$ ./streamdeck-examples icons

Labels

The labels example instantiates 15 text labels with an integer number on the Stream Deck. With the help of a counter, all numbers will be incremented every 100ms by 1. When a button is pressed, the background is colored blue.

$ ./streamdeck-examples labels

Ledbuttons

The ledbuttons example shows how to use the custom designed streamdeck-buttons/ledbutton element. It will enumerate all the buttons on the panel with their ID and with a green LED which can be activated / deactivated with a button press.

$ ./streamdeck-examples ledbuttons

Pages

The pages example is the most complex example. It shows how to build an application consisting of several linked and nested pages. Check out the Page interface.

$ ./streamdeck-examples pages

Slideshow

The slideshow example creates a slideshow on the Stream Deck, across all buttons. Images of different formats (png, jpeg, gif) are loaded, resized to match the panel and if necessary, cropped to the center.`,

$ ./streamdeck-examples slideshow

Textbuttons

The textbuttons example creates a text multi-line text button using a third party font. Whenever a button is pressed, the text is altered.

$ ./streamdeck-examples textbuttons

streamdeck-examples's People

Contributors

dh1tw avatar magicaltux avatar

Watchers

James Cloos 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.