triggers.json
Schema for Mudlet triggers described in triggers.json.
Schema URL
{ "$schema": "https://schema.gesslar.dev/muddler/v1/triggers.json"}Array Items
This schema defines an array where each item references: #/definitions/trigger
Definitions
This schema includes 2 reusable definition(s): pattern, trigger
Full Schema
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://schema.gesslar.dev/muddler/v1/triggers.json", "title": "Muddler Triggers Schema", "description": "Schema for Mudlet triggers described in triggers.json.", "type": "array", "items": { "$ref": "#/definitions/trigger" }, "definitions": { "pattern": { "type": "object", "required": [ "pattern" ], "properties": { "pattern": { "type": "string", "description": "Pattern text. For color triggers, use \"fg,bg\" (e.g. \"2,0\"). Prompt triggers may be empty." }, "type": { "type": "string", "description": "Pattern type.", "enum": [ "substring", "regex", "startOfLine", "exactMatch", "lua", "spacer", "color", "colour", "prompt" ], "default": "substring" } } }, "trigger": { "allOf": [ { "$ref": "https://schema.gesslar.dev/muddler/v1/common.json#/$defs/nodeBase" }, { "type": "object", "properties": { "isActive": { "description": "Yes if this trigger will automatically load, no otherwise." }, "isFolder": { "description": "Yes if this is a folder, no otherwise." }, "patterns": { "type": "array", "minItems": 1, "description": "List of trigger patterns.", "items": { "$ref": "#/definitions/pattern" } }, "multiline": { "$ref": "https://schema.gesslar.dev/muddler/v1/common.json#/$defs/yesNo", "description": "Treat as multiline trigger.", "default": "no" }, "multilineDelta": { "$ref": "https://schema.gesslar.dev/muddler/v1/common.json#/$defs/positiveIntOrDigitsString", "description": "Number of lines after the first match to keep open when multiline=yes." }, "matchall": { "$ref": "https://schema.gesslar.dev/muddler/v1/common.json#/$defs/yesNo", "description": "Perl /g style matching.", "default": "no" }, "filter": { "$ref": "https://schema.gesslar.dev/muddler/v1/common.json#/$defs/yesNo", "description": "Mark as filter trigger.", "default": "no" }, "fireLength": { "$ref": "https://schema.gesslar.dev/muddler/v1/common.json#/$defs/positiveIntOrDigitsString", "description": "Stay-open duration in milliseconds.", "default": "0" }, "soundFile": { "type": "string", "description": "Sound file to play on fire (enables sound trigger)." }, "highlight": { "$ref": "https://schema.gesslar.dev/muddler/v1/common.json#/$defs/yesNo", "description": "Enable colorizer trigger.", "default": "no" }, "highlightFG": { "$ref": "https://schema.gesslar.dev/muddler/v1/common.json#/$defs/hexColor" }, "highlightBG": { "$ref": "https://schema.gesslar.dev/muddler/v1/common.json#/$defs/hexColor" }, "command": { "type": "string", "description": "Command to execute when trigger fires (mCommand)." }, "children": { "type": "array", "description": "Nested triggers when used as a folder (isFolder=yes).", "items": { "$ref": "#/definitions/trigger" } } } } ], "unevaluatedProperties": false } }}