This repository has been archived on 2024-04-22. You can view files and clone it, but cannot push or open issues or pull requests.
caylon/kaylon.json

105 lines
2.3 KiB
JSON

{
"api-version": "v0.0.0",
"items": [
{
"element": "result-display",
"title": "Best Kaylon",
"result_of": 1
},
{
"element": "button",
"title": "Tell Me!",
"on_click": {
"action": "command",
"run": "echo ISAAC"
}
},
{
"element": "result-display",
"title": "Smartest Kaylon",
"result_of": 1
},
{
"element": "toggle",
"title": "Switch",
"description": "Toggle me!",
"on_toggle": {
"action": "command",
"run": "echo \"Toggle is now ${KAYLON_VALUE}\""
}
},
{
"element": "result-display",
"title": " ",
"result_of": 3
},
{
"element": "slider",
"title": "Slider",
"min": 0,
"max": 10,
"notches": null,
"on_set": {
"action": "command",
"run": "echo \"Slider is now ${KAYLON_VALUE}\""
}
},
{
"element": "result-display",
"title": " ",
"result_of": 5
},
{
"element": "reading",
"title": "Fan Speed",
"period_ms": 1000,
"on_period": {
"action": "transform",
"target": {
"action": "command",
"run": "cat /sys/class/hwmon/hwmon5/fan1_input"
},
"transformer": {
"rule": "post-expand",
"format": "$KAYLON_VALUE RPM"
}
}
},
{
"element": "toggle",
"title": "Lighthouses",
"description": "Turn Valve Index Lighthouses on",
"on_toggle": {
"action": "transform",
"target": {
"action": "transform",
"target": {
"action": "command",
"run": "python3 ./bin/lighthouse_ctrl.py ${KAYLON_VALUE}"
},
"transformer": {
"rule": "post-replace",
"patterns": [{"pattern": ".*", "format": "Done", "s": true}]
}
},
"transformer": {
"rule": "pre-replace",
"patterns": [
{"pattern": "TRUE", "format": "on", "i": true},
{"pattern": "FALSE", "format": "off", "i": true}
]
}
}
}
],
"about": {
"name": "Test name",
"version": "v0.42.0",
"description": "Test description",
"url": "https://github.com/NGnius/kaylon",
"authors": [
"NGnius <ngniusness@gmail.com>"
],
"license": "MIT"
}
}