-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(plugin): initial implementation
- Loading branch information
0 parents
commit bbdf182
Showing
39 changed files
with
8,366 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
name: Upload Release Asset | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v4 | ||
node-version: '20' | ||
- name: Install Dependencies | ||
run: make install | ||
- name: Build | ||
run: make build | ||
- name: Validate | ||
run: make build | ||
- name: Create Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
files: com.vlad-gramuzov.stream-deck-stateful-executor.sdPlugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Node.js | ||
node_modules/ | ||
|
||
# Stream Deck files | ||
*.sdPlugin/bin | ||
*.sdPlugin/logs | ||
|
||
# IDEs | ||
.idea/ | ||
.vscode/ | ||
|
||
# OS specific | ||
.DS_Store | ||
|
||
# Built plugin | ||
*.streadDeckPlugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
install: | ||
npm install; | ||
|
||
build-templates: | ||
npx mustache \ | ||
-p src/ui/action_settings_template.mustache \ | ||
-p src/ui/matcher_template.mustache \ | ||
src/ui/data.json src/ui/execution_template.mustache \ | ||
> com.vlad-gramuzov.stream-deck-stateful-executor.sdPlugin/ui/execution.html; | ||
|
||
validate: | ||
streamdeck validate com.vlad-gramuzov.stream-deck-stateful-executor.sdPlugin; | ||
|
||
build: build-templates | ||
npm run build; | ||
streamdeck pack com.vlad-gramuzov.stream-deck-stateful-executor.sdPlugin; | ||
|
||
.PHONY: install build-templates build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Stream Deck Stateful Executor | ||
|
||
Stateful Executor is the automation plugin for your Stream Deck, enabling execution of HTTP Requests, Apple Shortcuts, Terminal Commands, Shell Scripts with dynamic button state updates based on execution results. | ||
|
||
## Configuration | ||
|
||
### General Settings | ||
|
||
* `Enable success indicator`: displays the default success indicator when the execution completes without errors. This indicator does take matchers into account. | ||
|
||
Note that the error indicator is intentionally not configurable, as it is always shown when the execution fails. | ||
|
||
### Icons and Titles | ||
|
||
> TLDR; if you set icons/titles on the plugin level, make sure to leave the icons/titles empty in Stream Deck's UI (set to default) | ||
> IMPORTANT: when using custom icons, place them in a permanent location, as they are referenced by path. | ||
* If you pick an icon or a title using the default Stream Deck's UI, the first icon would represent the matched state, and the second icon would represent the unmatched state FOR ALL MATCHERS. Note that any customization made on the plugin level of the icons/titles would not work in this case. | ||
* If you want to have more states just leave icons/titles blank (set to default) and configure them through the plugin's configuration. | ||
|
||
### Actions | ||
|
||
#### Action triggers | ||
|
||
* `Click`: runs the action on button click | ||
* `Polling`: runs the action every `n` seconds, where `n` is the polling interval. The polling action will wait the action to finish before running the next one. | ||
|
||
You can combine both triggers, but polling will have a higher presentation priority. | ||
|
||
#### Action types | ||
|
||
* `request`: executes HTTP request. Use JSON-parsable output if you want to use matchers with requests. | ||
* `shortcut (MacOS only)`: executes Apple Shortcut. Use `Dictionary` output if you want to use matchers with shortcuts. | ||
* `terminal`: executes terminal command. Make sure to use JSON-parsable output if you want to use matchers with terminal commands. | ||
* `script`: executes shell script. Make sure to use JSON-parsable output if you want to use matchers with shell scripts. | ||
* `shell binary`: the shell binary to use for executing the script. Defaults to `/bin/bash`. You can experiment with other binaries, such as python, node, etc. | ||
* `script path`: the path to the script to execute. The script should be executable and have the appropriate shebang. | ||
|
||
### Matchers | ||
|
||
> Matchers currently can only be used with JSON results. Ensure your actions produce JSON-parsable outputs. | ||
* `Field`: dot-notated json path to the property used for matching. For example, if the output is `{"status": "ok"}`, the field would be `status`. | ||
* `Operator`: the operator to use for matching. Note strings and numbers have different operators. | ||
* `Value`: the value to match against. | ||
* `State Title`: Custom title to use when the matcher is matched. | ||
* `State Icon`: Custom icon path to use when the matcher is matched. |
Binary file added
BIN
+1.2 KB
com.vlad-gramuzov.stream-deck-stateful-executor.sdPlugin/imgs/actions/matched.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.65 KB
...lad-gramuzov.stream-deck-stateful-executor.sdPlugin/imgs/actions/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.1 KB
...vlad-gramuzov.stream-deck-stateful-executor.sdPlugin/imgs/actions/unmatched.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.51 KB
...d-gramuzov.stream-deck-stateful-executor.sdPlugin/imgs/actions/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.08 KB
com.vlad-gramuzov.stream-deck-stateful-executor.sdPlugin/imgs/icons/execution.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.72 KB
...lad-gramuzov.stream-deck-stateful-executor.sdPlugin/imgs/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.57 KB
...d-gramuzov.stream-deck-stateful-executor.sdPlugin/imgs/plugin/category-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.29 KB
...ramuzov.stream-deck-stateful-executor.sdPlugin/imgs/plugin/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+105 KB
...lad-gramuzov.stream-deck-stateful-executor.sdPlugin/imgs/plugin/marketplace.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+234 KB
...-gramuzov.stream-deck-stateful-executor.sdPlugin/imgs/plugin/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 54 additions & 0 deletions
54
com.vlad-gramuzov.stream-deck-stateful-executor.sdPlugin/manifest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"Name": "Stateful Executor", | ||
"Version": "0.1.0.0", | ||
"Author": "Vlad Gramuzov", | ||
"Actions": [ | ||
{ | ||
"Name": "Execution", | ||
"UUID": "com.vlad-gramuzov.stream-deck-stateful-executor.execution", | ||
"Icon": "imgs/icons/execution", | ||
"Tooltip": "Executes selected action", | ||
"PropertyInspectorPath": "ui/execution.html", | ||
"DisableAutomaticStates": true, | ||
"Controllers": [ | ||
"Keypad" | ||
], | ||
"States": [ | ||
{ | ||
"Name": "Matched", | ||
"Image": "imgs/actions/matched", | ||
"TitleAlignment": "bottom" | ||
}, | ||
{ | ||
"Name": "Unmatched", | ||
"Image": "imgs/actions/unmatched", | ||
"TitleAlignment": "bottom" | ||
} | ||
] | ||
} | ||
], | ||
"Category": "Stateful Executor", | ||
"CategoryIcon": "imgs/plugin/category-icon", | ||
"CodePath": "bin/plugin.js", | ||
"Description": "Execute HTTP Requests, Apple Shortcuts, Terminal Commands, and Shell Scripts with dynamic button state updates based on execution results", | ||
"Icon": "imgs/plugin/marketplace", | ||
"SDKVersion": 2, | ||
"Software": { | ||
"MinimumVersion": "6.4" | ||
}, | ||
"OS": [ | ||
{ | ||
"Platform": "mac", | ||
"MinimumVersion": "10.15" | ||
}, | ||
{ | ||
"Platform": "windows", | ||
"MinimumVersion": "10" | ||
} | ||
], | ||
"Nodejs": { | ||
"Version": "20", | ||
"Debug": "enabled" | ||
}, | ||
"UUID": "com.vlad-gramuzov.stream-deck-stateful-executor" | ||
} |
Oops, something went wrong.