"$comment":"Sadly can't use regex and enums at the same time. Fix in the future?",
...
...
@@ -330,21 +330,12 @@
"$comment":"References the widget structure from \"widgets\" below",
"$ref":"#/widgets/title"
},
"^dnd(#[a-zA-Z0-9_-]{1,}){0,1}?$":{
"$ref":"#/widgets/dnd"
},
"^label(#[a-zA-Z0-9_-]{1,}){0,1}?$":{
"$ref":"#/widgets/label"
},
"^mpris(#[a-zA-Z0-9_-]{1,}){0,1}?$":{
"$ref":"#/widgets/mpris"
},
"^buttons-grid(#[a-zA-Z0-9_-]{1,}){0,1}?$":{
"$ref":"#/widgets/buttons-grid"
},
"^menubar(#[a-zA-Z0-9_-]{1,}){0,1}?$":{
"$ref":"#/widgets/menubar"
},
"^slider(#[a-zA-Z0-9_-]{1,}){0,1}?$":{
"$ref":"#/widgets/slider"
},
...
...
@@ -392,18 +383,6 @@
}
}
},
"dnd":{
"type":"object",
"description":"Control Center Do Not Disturb Widget",
"additionalProperties":false,
"properties":{
"text":{
"type":"string",
"description":"The title of the widget",
"default":"Do Not Disturb"
}
}
},
"label":{
"type":"object",
"description":"A generic widget that allows the user to add custom text",
...
...
@@ -458,143 +437,6 @@
}
}
},
"buttons-grid":{
"type":"object",
"description":"A widget to add a grid of buttons that execute shell commands",
"additionalProperties":false,
"properties":{
"buttons-per-row":{
"type":"number",
"description":"How many buttons should be shown in a buttons-grid row"
},
"actions":{
"type":"array",
"description":"A list of actions containing a label and a command",
"items":{
"type":"object",
"properties":{
"label":{
"type":"string",
"description":"Text to be displayed in button",
"default":"label"
},
"command":{
"type":"string",
"description":"Command to be executed on click",
"default":""
},
"type":{
"type":"string",
"description":"Type of the button; toggle buttons receive the .active css class and an env variable 'XSNC_TOGGLE_STATE' is set. See example in the default config.json",
"default":"normal",
"enum":["normal","toggle"]
},
"update-command":{
"type":"string",
"description":"Command to be executed on visibility change of cc to update the active state of the toggle button (should echo true or false)",
"default":""
},
"active":{
"type":"boolean",
"description":"Whether the toggle button is active as default or not",
"default":false
}
}
}
}
}
},
"menubar":{
"type":"object",
"description":"A bar that contains action-buttons and buttons to open a dropdown with action-buttons",
"additionalProperties":false,
"patternProperties":{
"^menu(#[a-zA-Z0-9_-]{1,}){0,1}?$":{
"type":"object",
"description":"A button that opens a dropdown with action-buttons",
"additionalProperties":false,
"properties":{
"label":{
"type":"string",
"description":"Text to be displayed in button",
"default":"Menu"
},
"position":{
"type":"string",
"description":"Horizontal position of the button in the bar",
"default":"right",
"enum":["right","left"]
},
"animation-type":{
"type":"string",
"default":"slide_down",
"description":"Animation type for menu",
"enum":["slide_down","slide_up","none"]
},
"animation-duration":{
"type":"integer",
"default":250,
"description":"Duration of animation in milliseconds"
"description":"A button that opens a dropdown with power profile options from D-Bus PowerProfiles daemon. Profiles are detected automatically.",
"additionalProperties":false,
"properties":{
"label":{
"type":"string",
"description":"Text to be displayed in the button",
"default":"Power"
},
"position":{
"type":"string",
"description":"Horizontal position of the button in the bar",
"default":"right",
"enum":["right","left"]
},
"animation-type":{
"type":"string",
"default":"slide_down",
"description":"Animation type for the dropdown",
"enum":["slide_down","slide_up","none"]
},
"animation-duration":{
"type":"integer",
"default":250,
"description":"Duration of animation in milliseconds"
},
"button-labels":{
"type":"object",
"description":"Override button text for specific profiles. Keys are profile names (performance, balanced, power-saver), values are the full button text.",