Giter VIP home page Giter VIP logo

sd-page-switch's Introduction

A simple proof of concept plugin for switching profiles with WebSocket messages from Keyboard Maestro macros.

Clone the repo

git clone https://github.com/dtsmarin/sdprofileswitch

Install dependencies

npm install

Add the Plugin to Stream Deck

Create a SymLink of your plugin folder inside the Stream Deck's Plugins folder.

ln -s $(pwd)/com.example.profile-switch.sdPlugin ~/Library/Application\ Support/com.elgato.StreamDeck/Plugins/

Add your Profiles to the Plugin

Copy the profiles you want to use as a starting point inside the com.example.profile-switch.sdPlugin folder of the repo.

In the manifest.json file define the same profiles using the exact name and the correct DeviceType code for your SD device.

Inside the file plugin.ts change the Websocket switch cases and profile names to match your requirements.

Build the plugin with npm run build.

Add the template counter function inside any existing user StreamDeck profile to initialize the plugin.

When the plugin receives any WebSocket message that matches any of the switch cases Stream Deck will prompt you to install the profiles you bundled with the plugin.

Rust WebSocket CLI

This specific code is not neccesary, you can use anything that works in a similar way (Basic WebSocket client). I'm not a Rust expert.

cargo build --release

Usage:

streamdeckws <message string>

How to use in Keyboard Maestro

  • Add an If Then Else block.
  • To avoid sending to the WebSocket server when it doesn't exist add as a condition: This application: -> Elgato Stream Deck -> is running
  • Inside the execute the following actions branch add an Execute Shell Script block.
[pathToYourRustExecutable]/streamdeckws <message string>

I'll have to update the plugin to use the new SDK 0.2.0 because there are some useful features to explore: https://github.com/elgatosf/streamdeck/blob/main/CHANGELOG.md

sd-page-switch's People

Contributors

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