From 5c3e11326b1a09f2631b6dcbce32cd2a90f0433d Mon Sep 17 00:00:00 2001 From: EmilyGraceSeville7cf Date: Tue, 6 Feb 2024 23:54:15 +1000 Subject: [PATCH 01/19] feat: add json schema --- schemas/schema.json | 66 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 schemas/schema.json diff --git a/schemas/schema.json b/schemas/schema.json new file mode 100644 index 000000000..a00c650cc --- /dev/null +++ b/schemas/schema.json @@ -0,0 +1,66 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "GlazeWM settings", + "description": "GlazeWM settings", + "type": "object", + "properties": { + "general": { + "title": "general", + "description": "General settings", + "type": "object", + "properties": { + "focus_follows_cursor": { + "title": "focus follows cursor", + "description": "Whether to automatically focus windows underneath the cursor", + "type": "boolean", + "default": false + }, + "cursor_follows_focus": { + "title": "cursor follows focus", + "description": "Whether to jump the cursor between windows focused by the WM", + "type": "boolean", + "default": false + }, + "toggle_workspace_on_refocus": { + "title": "toggle workspace on refocus", + "description": "Whether to switch back and forth between the previously focused workspace when focusing the current workspace", + "type": "boolean", + "default": true + }, + "show_floating_on_top": { + "title": "show floating on top", + "description": "Whether to show floating windows as always on top", + "type": "boolean", + "default": false + }, + "floating_window_move_amount": { + "title": "floating window move amount", + "description": "Amount to move floating windows by", + "type": "string", + "minLength": 2, + "pattern": "^\\d+%$", + "default": "5%" + }, + "center_new_floating_windows": { + "title": "center new floating windows", + "description": "Whether to center new floating windows", + "type": "boolean", + "default": true + }, + "window_animations": { + "title": "window animations", + "description": "Whether to globally enable window transition animations", + "oneOf": [ + { + "type": "boolean" + }, + { "type": "string", "const": "unchanged" } + ], + "default": "unchanged" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false +} From 858b0f98052fc81cd4072804fab9de9530948ef7 Mon Sep 17 00:00:00 2001 From: EmilyGraceSeville7cf Date: Wed, 7 Feb 2024 00:23:08 +1000 Subject: [PATCH 02/19] feat: support keybindings --- schemas/schema.json | 95 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/schemas/schema.json b/schemas/schema.json index a00c650cc..d9d87bc8b 100644 --- a/schemas/schema.json +++ b/schemas/schema.json @@ -1,5 +1,38 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "command": { + "description": "A command", + "type": "string", + "examples": [ + "focus", + "focus workspace", + "focus workspace", + "move", + "move to workspace", + "resize", + "resize borders", + "set", + "set", + "toggle", + "focus mode toggle", + "tiling direction", + "exit wm", + "reload config", + "close", + "exec", + "ignore" + ] + }, + "binding": { + "description": "A binding", + "type": "string", + "not": { + "pattern": "^\\s+$" + }, + "examples": ["Alt+H"] + } + }, "title": "GlazeWM settings", "description": "GlazeWM settings", "type": "object", @@ -60,6 +93,68 @@ } }, "additionalProperties": false + }, + "keybindings": { + "title": "keybindings", + "description": "Keybindings", + "type": "array", + "uniqueItems": true, + "items": { + "description": "A keybinding", + "type": "object", + "oneOf": [ + { + "properties": { + "binding": { + "title": "binding", + "$ref": "#/definitions/binding" + }, + "command": { + "title": "command", + "$ref": "#/definitions/command" + } + }, + "additionalProperties": false + }, + { + "properties": { + "binding": { + "title": "binding", + "$ref": "#/definitions/binding" + }, + "commands": { + "title": "commands", + "type": "array", + "uniqueItems": true, + "minItems": 2, + "items": { + "$ref": "#/definitions/command" + } + } + }, + "additionalProperties": false + }, + { + "properties": { + "bindings": { + "title": "bindings", + "type": "array", + "uniqueItems": true, + "minItems": 2, + "items": { + "$ref": "#/definitions/binding" + } + }, + "command": { + "title": "command", + "$ref": "#/definitions/command" + } + }, + "additionalProperties": false + } + ] + }, + "additionalProperties": false } }, "additionalProperties": false From d527f6cf0894523ba72a1ef78cea0ef0560d417a Mon Sep 17 00:00:00 2001 From: EmilyGraceSeville7cf Date: Wed, 7 Feb 2024 00:37:59 +1000 Subject: [PATCH 03/19] feat: support focus properties --- schemas/schema.json | 60 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/schemas/schema.json b/schemas/schema.json index d9d87bc8b..85b468609 100644 --- a/schemas/schema.json +++ b/schemas/schema.json @@ -31,6 +31,22 @@ "pattern": "^\\s+$" }, "examples": ["Alt+H"] + }, + "color": { + "description": "A color", + "type": "string", + "minLength": 7, + "maxLength": 7, + "pattern": "^#[A-Za-z0-9]{6}$", + "examples": [ + "#000000", + "#FF0000", + "#00FF00", + "#0000FF", + "#FFFF00", + "#FF00FF", + "#FFFFFF" + ] } }, "title": "GlazeWM settings", @@ -155,6 +171,50 @@ ] }, "additionalProperties": false + }, + "focus_borders": { + "title": "focus borders", + "description": "Focus settings", + "type": "object", + "properties": { + "active": { + "title": "active", + "description": "An active border", + "type": "object", + "properties": { + "enabled": { + "title": "enabled", + "description": "Whether to enable an active border", + "type": "boolean", + "default": true + }, + "color": { + "title": "color", + "$ref": "#/definitions/color" + } + }, + "additionalProperties": false + }, + "inactive": { + "title": "inactive", + "description": "An inactive border", + "type": "object", + "properties": { + "enabled": { + "title": "enabled", + "description": "Whether to enable an inactive border", + "type": "boolean", + "default": false + }, + "color": { + "title": "color", + "$ref": "#/definitions/color" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false } }, "additionalProperties": false From c1482f0938a4537f9b2fc4806e4cc463928399ea Mon Sep 17 00:00:00 2001 From: EmilyGraceSeville7cf Date: Wed, 7 Feb 2024 00:52:11 +1000 Subject: [PATCH 04/19] feat: specify minItems --- schemas/schema.json | 1 + 1 file changed, 1 insertion(+) diff --git a/schemas/schema.json b/schemas/schema.json index 85b468609..633e9ab94 100644 --- a/schemas/schema.json +++ b/schemas/schema.json @@ -115,6 +115,7 @@ "description": "Keybindings", "type": "array", "uniqueItems": true, + "minItems": 1, "items": { "description": "A keybinding", "type": "object", From 4de6a61e13bc086ea7f849fb594fbe52a7cef001 Mon Sep 17 00:00:00 2001 From: EmilyGraceSeville7cf Date: Wed, 7 Feb 2024 01:00:36 +1000 Subject: [PATCH 05/19] feat: support gap settings --- schemas/schema.json | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/schemas/schema.json b/schemas/schema.json index 633e9ab94..af50d7b94 100644 --- a/schemas/schema.json +++ b/schemas/schema.json @@ -1,6 +1,9 @@ { "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { + "invalid-shorthand-property": { + "pattern": "^\\s+$|\\spx\\s|\\spx$|^px\\s" + }, "command": { "description": "A command", "type": "string", @@ -216,6 +219,34 @@ } }, "additionalProperties": false + }, + "gaps": { + "title": "gaps", + "description": "Gap settings", + "type": "object", + "properties": { + "inner_gap": { + "title": "inner gap", + "description": "An inner gap", + "type": "string", + "minLength": 1, + "not": { + "$ref": "#/definitions/invalid-shorthand-property" + }, + "default": "20px" + }, + "outer_gap": { + "title": "outer gap", + "description": "An outer gap", + "type": "string", + "minLength": 1, + "not": { + "$ref": "#/definitions/invalid-shorthand-property" + }, + "default": "20px" + } + }, + "additionalProperties": false } }, "additionalProperties": false From c9e5306b3bf9f3f0ffddbd1e2ff3487c183b6fe1 Mon Sep 17 00:00:00 2001 From: EmilyGraceSeville7cf Date: Wed, 7 Feb 2024 01:03:28 +1000 Subject: [PATCH 06/19] feat: better validate shorthand properties --- schemas/schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/schema.json b/schemas/schema.json index af50d7b94..eb405ef11 100644 --- a/schemas/schema.json +++ b/schemas/schema.json @@ -2,7 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "invalid-shorthand-property": { - "pattern": "^\\s+$|\\spx\\s|\\spx$|^px\\s" + "pattern": "^\\s+$|\\spx\\s|\\spx$|^px\\s|^\\S+(\\s\\S+){4}$" }, "command": { "description": "A command", From ad0eb8ffa1889505c9e2c55bfe0d72d475fc35e1 Mon Sep 17 00:00:00 2001 From: EmilyGraceSeville7cf Date: Wed, 7 Feb 2024 01:32:09 +1000 Subject: [PATCH 07/19] feat: support workspaces --- schemas/schema.json | 48 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/schemas/schema.json b/schemas/schema.json index eb405ef11..1cef155cf 100644 --- a/schemas/schema.json +++ b/schemas/schema.json @@ -1,6 +1,9 @@ { "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { + "empty": { + "pattern": "^\\s+$" + }, "invalid-shorthand-property": { "pattern": "^\\s+$|\\spx\\s|\\spx$|^px\\s|^\\S+(\\s\\S+){4}$" }, @@ -247,6 +250,51 @@ } }, "additionalProperties": false + }, + "workspaces": { + "title": "workspaces", + "description": "Workspace settings", + "type": "array", + "uniqueItems": true, + "minItems": 1, + "items": { + "description": "A workspace setting", + "type": "object", + "properties": { + "name": { + "title": "name", + "description": "A unique name", + "type": "string", + "minLength": 1, + "not": { + "$ref": "#/definitions/empty" + }, + "examples": ["1"] + }, + "display_name": { + "title": "display name", + "description": "A display name", + "type": "string", + "minLength": 1, + "not": { + "$ref": "#/definitions/empty" + }, + "examples": ["1"] + }, + "bind_to_monitor": { + "title": "bind to monitor", + "description": "Whether to bind a workspace to a specific monitor", + "type": "boolean" + }, + "keep_alive": { + "title": "keep alive", + "description": "Whether not to destroy a workspace when it's empty", + "type": "boolean", + "default": false + } + }, + "additionalProperties": false + } } }, "additionalProperties": false From 21b3173e6d5d3b28993dc6809753a02913777d36 Mon Sep 17 00:00:00 2001 From: EmilyGraceSeville7cf Date: Wed, 7 Feb 2024 19:58:52 +1000 Subject: [PATCH 08/19] feat: support bar settings --- schemas/schema.json | 140 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 136 insertions(+), 4 deletions(-) diff --git a/schemas/schema.json b/schemas/schema.json index 1cef155cf..819f43dd7 100644 --- a/schemas/schema.json +++ b/schemas/schema.json @@ -5,7 +5,7 @@ "pattern": "^\\s+$" }, "invalid-shorthand-property": { - "pattern": "^\\s+$|\\spx\\s|\\spx$|^px\\s|^\\S+(\\s\\S+){4}$" + "pattern": "^\\s+$|\\spx\\s|\\spx$|^px\\s|^\\s*\\S+(\\s+\\S+){4,}\\s*$" }, "command": { "description": "A command", @@ -41,10 +41,18 @@ "color": { "description": "A color", "type": "string", - "minLength": 7, - "maxLength": 7, - "pattern": "^#[A-Za-z0-9]{6}$", + "pattern": "^\\S+$", "examples": [ + "red", + "orange", + "yellow", + "green", + "cyan", + "blue", + "purple", + "pink", + "white", + "black", "#000000", "#FF0000", "#00FF00", @@ -53,6 +61,11 @@ "#FF00FF", "#FFFFFF" ] + }, + "length": { + "type": "string", + "pattern": "^\\d+px$", + "examples": ["20px"] } }, "title": "GlazeWM settings", @@ -295,6 +308,125 @@ }, "additionalProperties": false } + }, + "bar": { + "title": "bar", + "description": "Bar settings", + "type": "object", + "properties": { + "enabled": { + "title": "title", + "description": "Whether to enable the bar", + "type": "boolean", + "default": true + }, + "height": { + "title": "height", + "description": "A height of the bar", + "$ref": "#/definitions/length", + "default": "30px" + }, + "position": { + "title": "position", + "description": "A position of the bar", + "type": "string", + "enum": ["top", "bottom"], + "default": "top" + }, + "always_on_top": { + "title": "always on top", + "description": "Whether to keep the bar above other windows", + "type": "boolean", + "default": false + }, + "opacity": { + "title": "opacity", + "description": "An opacity of the bar", + "type": "number", + "minimum": 0, + "maximum": 1, + "default": 1 + }, + "background": { + "title": "background", + "description": "A background of the bar", + "$ref": "#/definitions/color", + "default": "#101010" + }, + "foreground": { + "title": "foreground", + "description": "A foreground of the bar", + "$ref": "#/definitions/color", + "default": "white" + }, + "font_family": { + "title": "font family", + "description": "A font family of the bar", + "type": "string", + "minLength": 1, + "pattern": "^\\S+(\\s+\\S+)*$", + "default": "Segoe UI" + }, + "font_size": { + "title": "font size", + "description": "A font size of the bar", + "$ref": "#/definitions/length", + "default": "13px" + }, + "font_weight": { + "title": "font weight", + "description": "A font weight of the bar", + "type": "integer", + "minimum": 0, + "default": 400, + "examples": ["100", "950"] + }, + "border_width": { + "title": "border width", + "description": "A border width of the bar", + "type": "string", + "minLength": 1, + "not": { + "$ref": "#/definitions/invalid-shorthand-property" + }, + "default": "0" + }, + "border_color": { + "title": "border color", + "description": "A border color of the bar", + "$ref": "#/definitions/color", + "default": "blue" + }, + "padding": { + "title": "padding", + "description": "A padding of the bar", + "type": "string", + "minLength": 1, + "not": { + "$ref": "#/definitions/invalid-shorthand-property" + }, + "default": "4px 6px 4px 6px" + }, + "offset_x": { + "title": "offset x", + "description": "A horizontal offset of the bar", + "type": "integer", + "default": 0 + }, + "offset_y": { + "title": "offset y", + "description": "A vertical offset of the bar", + "type": "integer", + "default": 0 + }, + "border_radius": { + "title": "border radius", + "description": "A border radius of the bar", + "type": "integer", + "default": 0 + } + }, + "additionalProperties": false } }, "additionalProperties": false From a3411fb8c623d8f0d1f2d5569f1dbec3050ef791 Mon Sep 17 00:00:00 2001 From: EmilyGraceSeville7cf Date: Wed, 7 Feb 2024 20:18:42 +1000 Subject: [PATCH 09/19] feat: clean-up schema --- schemas/schema.json | 66 ++++++++++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 27 deletions(-) diff --git a/schemas/schema.json b/schemas/schema.json index 819f43dd7..ad6c7da14 100644 --- a/schemas/schema.json +++ b/schemas/schema.json @@ -10,23 +10,38 @@ "command": { "description": "A command", "type": "string", + "not": { + "pattern": "^\\s+$|\\spx\\s|\\spx$|^px\\s|([A-Za-z]+)\\s\\1|%%" + }, "examples": [ - "focus", - "focus workspace", - "focus workspace", - "move", - "move to workspace", - "resize", - "resize borders", - "set", - "set", - "toggle", + "focus left", + "focus right", + "focus up", + "focus down", + "focus workspace prev", + "focus workspace next", + "focus workspace recent", + "move left", + "move right", + "move up", + "move down", + "move to workspace WORKSPACE_NAME", + "resize HEIGHT WIDTH", + "resize borders SHORTHAND_PROPERTY", + "set floating", + "set tiling", + "set minimized", + "set maximized", + "toggle floating", + "toggle maximized", "focus mode toggle", - "tiling direction", + "tiling direction vertical", + "tiling direction horizontal", + "tiling direction toggle", "exit wm", "reload config", "close", - "exec", + "exec PROCESS_NAME", "ignore" ] }, @@ -39,7 +54,6 @@ "examples": ["Alt+H"] }, "color": { - "description": "A color", "type": "string", "pattern": "^\\S+$", "examples": [ @@ -103,7 +117,7 @@ }, "floating_window_move_amount": { "title": "floating window move amount", - "description": "Amount to move floating windows by", + "description": "An amount to move floating windows by", "type": "string", "minLength": 2, "pattern": "^\\d+%$", @@ -117,7 +131,7 @@ }, "window_animations": { "title": "window animations", - "description": "Whether to globally enable window transition animations", + "description": "Whether to enable window transition animations", "oneOf": [ { "type": "boolean" @@ -204,12 +218,13 @@ "properties": { "enabled": { "title": "enabled", - "description": "Whether to enable an active border", + "description": "Whether to enable the active border", "type": "boolean", "default": true }, "color": { "title": "color", + "description": "A color of the active border", "$ref": "#/definitions/color" } }, @@ -222,12 +237,13 @@ "properties": { "enabled": { "title": "enabled", - "description": "Whether to enable an inactive border", + "description": "Whether to enable the inactive border", "type": "boolean", "default": false }, "color": { "title": "color", + "description": "A color of the active border", "$ref": "#/definitions/color" } }, @@ -276,32 +292,28 @@ "properties": { "name": { "title": "name", - "description": "A unique name", + "description": "A unique name of the workspace", "type": "string", "minLength": 1, - "not": { - "$ref": "#/definitions/empty" - }, + "pattern": "\\S", "examples": ["1"] }, "display_name": { "title": "display name", - "description": "A display name", + "description": "A display name of the workspace", "type": "string", "minLength": 1, - "not": { - "$ref": "#/definitions/empty" - }, + "pattern": "\\S", "examples": ["1"] }, "bind_to_monitor": { "title": "bind to monitor", - "description": "Whether to bind a workspace to a specific monitor", + "description": "Whether to bind the workspace to a specific monitor", "type": "boolean" }, "keep_alive": { "title": "keep alive", - "description": "Whether not to destroy a workspace when it's empty", + "description": "Whether not to destroy the workspace when it's empty", "type": "boolean", "default": false } From ab1cf97820a6d3fc4f64b375dff8d8c9b5707765 Mon Sep 17 00:00:00 2001 From: EmilyGraceSeville7cf Date: Wed, 7 Feb 2024 20:27:34 +1000 Subject: [PATCH 10/19] feat: require command not to be empty --- schemas/schema.json | 1 + 1 file changed, 1 insertion(+) diff --git a/schemas/schema.json b/schemas/schema.json index ad6c7da14..b70a30e98 100644 --- a/schemas/schema.json +++ b/schemas/schema.json @@ -10,6 +10,7 @@ "command": { "description": "A command", "type": "string", + "minLength": 1, "not": { "pattern": "^\\s+$|\\spx\\s|\\spx$|^px\\s|([A-Za-z]+)\\s\\1|%%" }, From 9b25892d6012cab7ae71d934f47dd4907883dfe2 Mon Sep 17 00:00:00 2001 From: EmilyGraceSeville7cf Date: Wed, 7 Feb 2024 20:36:35 +1000 Subject: [PATCH 11/19] fix: respect word boundaries --- schemas/schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/schema.json b/schemas/schema.json index b70a30e98..fcd90b4c9 100644 --- a/schemas/schema.json +++ b/schemas/schema.json @@ -12,7 +12,7 @@ "type": "string", "minLength": 1, "not": { - "pattern": "^\\s+$|\\spx\\s|\\spx$|^px\\s|([A-Za-z]+)\\s\\1|%%" + "pattern": "^\\s+$|\\spx\\s|\\spx$|^px\\s|\\b([A-Za-z]+)\\b\\s+\\1|%%" }, "examples": [ "focus left", From a08e65eaa932a79c2923894b8a975d2ed2f8f449 Mon Sep 17 00:00:00 2001 From: EmilyGraceSeville7cf Date: Thu, 8 Feb 2024 01:48:09 +1000 Subject: [PATCH 12/19] feat: support components --- schemas/schema.json | 1055 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 1021 insertions(+), 34 deletions(-) diff --git a/schemas/schema.json b/schemas/schema.json index fcd90b4c9..08d7ecdec 100644 --- a/schemas/schema.json +++ b/schemas/schema.json @@ -81,6 +81,1004 @@ "type": "string", "pattern": "^\\d+px$", "examples": ["20px"] + }, + "padding-property": { + "title": "padding", + "type": "string", + "minLength": 1, + "not": { + "$ref": "#/definitions/invalid-shorthand-property" + }, + "default": "0" + }, + "opacity-property": { + "title": "opacity", + "type": "number", + "minimum": 0, + "maximum": 1, + "default": 1 + }, + "background-property": { + "title": "background", + "$ref": "#/definitions/color", + "default": "#101010" + }, + "foreground-property": { + "title": "foreground", + "$ref": "#/definitions/color", + "default": "white" + }, + "font-family-property": { + "title": "font family", + "type": "string", + "minLength": 1, + "pattern": "^\\S+(\\s+\\S+)*$", + "default": "Segoe UI" + }, + "font-size-property": { + "title": "font size", + "$ref": "#/definitions/length", + "default": "13px" + }, + "font-weight-property": { + "title": "font weight", + "type": "integer", + "minimum": 0, + "default": 400, + "examples": ["100", "950"] + }, + "border-width-property": { + "title": "border width", + "type": "string", + "minLength": 1, + "not": { + "$ref": "#/definitions/invalid-shorthand-property" + }, + "default": "0" + }, + "border-color-property": { + "title": "border color", + "$ref": "#/definitions/color", + "default": "blue" + }, + "component.type-property": { + "title": "type", + "description": "A type of the component", + "type": "string", + "minLength": 1, + "pattern": "\\S", + "examples": [ + "clock", + "battery", + "cpu", + "gpu", + "network", + "volume", + "text file", + "weather", + "image", + "system tray", + "music" + ] + }, + "component.margin-property": { + "title": "margin", + "description": "A margin of the component", + "type": "string", + "minLength": 1, + "not": { + "$ref": "#/definitions/invalid-shorthand-property" + }, + "default": "0 10px 0 0" + }, + "component.padding-property": { + "description": "A padding of the component", + "$ref": "#/definitions/padding-property" + }, + "component.opacity-property": { + "description": "An opacity of the component", + "$ref": "#/definitions/opacity-property" + }, + "component.background-property": { + "description": "A background of the component", + "$ref": "#/definitions/background-property" + }, + "component.foreground-property": { + "description": "A foreground of the component", + "$ref": "#/definitions/foreground-property" + }, + "component.font-family-property": { + "description": "A font family of the component", + "$ref": "#/definitions/font-family-property" + }, + "component.font-size-property": { + "description": "A font size of the component", + "$ref": "#/definitions/font-size-property" + }, + "component.font-weight-property": { + "description": "A font weight of the component", + "$ref": "#/definitions/font-weight-property" + }, + "component.border-width-property": { + "description": "A border width of the component", + "$ref": "#/definitions/border-width-property" + }, + "component.border-color-property": { + "description": "A border color of the component", + "$ref": "#/definitions/border-color-property" + }, + "components": { + "uniqueItems": true, + "minItems": 1, + "items": { + "description": "Component settings", + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/component.type-property" + }, + "margin": { + "$ref": "#/definitions/component.margin-property" + }, + "padding": { + "$ref": "#/definitions/component.padding-property" + }, + "opacity": { + "$ref": "#/definitions/component.opacity-property" + }, + "background": { + "$ref": "#/definitions/component.background-property" + }, + "foreground": { + "$ref": "#/definitions/component.foreground-property" + }, + "font_family": { + "$ref": "#/definitions/component.font-family-property" + }, + "font_size": { + "$ref": "#/definitions/component.font-size-property" + }, + "font_weight": { + "$ref": "#/definitions/component.font-weight-property" + }, + "border_width": { + "$ref": "#/definitions/component.border-width-property" + }, + "border_color": { + "$ref": "#/definitions/component.border-color-property" + } + }, + "allOf": [ + { + "if": { + "properties": { + "type": { + "const": "clock" + } + } + }, + "then": { + "properties": { + "type": { + "$ref": "#/definitions/component.type-property" + }, + "margin": { + "$ref": "#/definitions/component.margin-property" + }, + "padding": { + "$ref": "#/definitions/component.padding-property" + }, + "opacity": { + "$ref": "#/definitions/component.opacity-property" + }, + "background": { + "$ref": "#/definitions/component.background-property" + }, + "foreground": { + "$ref": "#/definitions/component.foreground-property" + }, + "font_family": { + "$ref": "#/definitions/component.font-family-property" + }, + "font_size": { + "$ref": "#/definitions/component.font-size-property" + }, + "font_weight": { + "$ref": "#/definitions/component.font-weight-property" + }, + "border_width": { + "$ref": "#/definitions/component.border-width-property" + }, + "border_color": { + "$ref": "#/definitions/component.border-color-property" + }, + "time_formatting": { + "title": "time formatting", + "description": "A time formatting of the 'Clock' component", + "type": "string", + "examples": ["hh:mm tt ddd MMM d"] + } + }, + "additionalProperties": false + } + }, + { + "if": { + "properties": { + "type": { + "const": "battery" + } + } + }, + "then": { + "properties": { + "type": { + "$ref": "#/definitions/component.type-property" + }, + "margin": { + "$ref": "#/definitions/component.margin-property" + }, + "padding": { + "$ref": "#/definitions/component.padding-property" + }, + "opacity": { + "$ref": "#/definitions/component.opacity-property" + }, + "background": { + "$ref": "#/definitions/component.background-property" + }, + "foreground": { + "$ref": "#/definitions/component.foreground-property" + }, + "font_family": { + "$ref": "#/definitions/component.font-family-property" + }, + "font_size": { + "$ref": "#/definitions/component.font-size-property" + }, + "font_weight": { + "$ref": "#/definitions/component.font-weight-property" + }, + "border_width": { + "$ref": "#/definitions/component.border-width-property" + }, + "border_color": { + "$ref": "#/definitions/component.border-color-property" + }, + "label_draining": { + "title": "label draining", + "description": "A draining label of the 'Battery' component", + "type": "string", + "examples": ["{battery_level}% remaining"] + }, + "label_power_saver": { + "title": "label power saver", + "description": "A power saver label of the 'Battery' component", + "type": "string", + "examples": ["{battery_level}% (power saver)"] + }, + "label_charging": { + "title": "label charging", + "description": "A charging label of the 'Battery' component", + "type": "string", + "examples": ["{battery_level}% (charging)"] + } + }, + "additionalProperties": false + } + }, + { + "if": { + "properties": { + "type": { + "const": "cpu" + } + } + }, + "then": { + "properties": { + "type": { + "$ref": "#/definitions/component.type-property" + }, + "margin": { + "$ref": "#/definitions/component.margin-property" + }, + "padding": { + "$ref": "#/definitions/component.padding-property" + }, + "opacity": { + "$ref": "#/definitions/component.opacity-property" + }, + "background": { + "$ref": "#/definitions/component.background-property" + }, + "foreground": { + "$ref": "#/definitions/component.foreground-property" + }, + "font_family": { + "$ref": "#/definitions/component.font-family-property" + }, + "font_size": { + "$ref": "#/definitions/component.font-size-property" + }, + "font_weight": { + "$ref": "#/definitions/component.font-weight-property" + }, + "border_width": { + "$ref": "#/definitions/component.border-width-property" + }, + "border_color": { + "$ref": "#/definitions/component.border-color-property" + }, + "label": { + "title": "label", + "description": "A label for the 'CPU Usage' component", + "type": "string", + "examples": ["CPU: {percent_usage}%"] + }, + "refresh_interval_ms": { + "title": "refresh interval ms", + "description": "A refresh interval for the 'CPU Usage' component", + "type": "integer", + "minimum": 0, + "examples": [1000] + } + }, + "additionalProperties": false + } + }, + { + "if": { + "properties": { + "type": { + "const": "gpu" + } + } + }, + "then": { + "properties": { + "type": { + "$ref": "#/definitions/component.type-property" + }, + "margin": { + "$ref": "#/definitions/component.margin-property" + }, + "padding": { + "$ref": "#/definitions/component.padding-property" + }, + "opacity": { + "$ref": "#/definitions/component.opacity-property" + }, + "background": { + "$ref": "#/definitions/component.background-property" + }, + "foreground": { + "$ref": "#/definitions/component.foreground-property" + }, + "font_family": { + "$ref": "#/definitions/component.font-family-property" + }, + "font_size": { + "$ref": "#/definitions/component.font-size-property" + }, + "font_weight": { + "$ref": "#/definitions/component.font-weight-property" + }, + "border_width": { + "$ref": "#/definitions/component.border-width-property" + }, + "border_color": { + "$ref": "#/definitions/component.border-color-property" + }, + "label": { + "title": "label", + "description": "A label for the 'GPU Usage' component", + "type": "string", + "examples": ["GPU: {percent_usage}%"] + }, + "refresh_interval_ms": { + "title": "refresh interval ms", + "description": "A refresh interval for the 'GPU Usage' component", + "type": "integer", + "minimum": 0, + "examples": [1000] + } + }, + "additionalProperties": false + } + }, + { + "if": { + "properties": { + "type": { + "const": "memory" + } + } + }, + "then": { + "properties": { + "type": { + "$ref": "#/definitions/component.type-property" + }, + "margin": { + "$ref": "#/definitions/component.margin-property" + }, + "padding": { + "$ref": "#/definitions/component.padding-property" + }, + "opacity": { + "$ref": "#/definitions/component.opacity-property" + }, + "background": { + "$ref": "#/definitions/component.background-property" + }, + "foreground": { + "$ref": "#/definitions/component.foreground-property" + }, + "font_family": { + "$ref": "#/definitions/component.font-family-property" + }, + "font_size": { + "$ref": "#/definitions/component.font-size-property" + }, + "font_weight": { + "$ref": "#/definitions/component.font-weight-property" + }, + "border_width": { + "$ref": "#/definitions/component.border-width-property" + }, + "border_color": { + "$ref": "#/definitions/component.border-color-property" + }, + "label": { + "title": "label", + "description": "A label for the 'Memory Usage' component", + "type": "string", + "examples": ["RAM: {percent_usage}%"] + }, + "refresh_interval_ms": { + "title": "refresh interval ms", + "description": "A refresh interval for the 'Memory Usage' component", + "type": "integer", + "minimum": 0, + "examples": [1000] + } + }, + "additionalProperties": false + } + }, + { + "if": { + "properties": { + "type": { + "const": "network" + } + } + }, + "then": { + "properties": { + "type": { + "$ref": "#/definitions/component.type-property" + }, + "margin": { + "$ref": "#/definitions/component.margin-property" + }, + "padding": { + "$ref": "#/definitions/component.padding-property" + }, + "opacity": { + "$ref": "#/definitions/component.opacity-property" + }, + "background": { + "$ref": "#/definitions/component.background-property" + }, + "foreground": { + "$ref": "#/definitions/component.foreground-property" + }, + "font_family": { + "$ref": "#/definitions/component.font-family-property" + }, + "font_size": { + "$ref": "#/definitions/component.font-size-property" + }, + "font_weight": { + "$ref": "#/definitions/component.font-weight-property" + }, + "border_width": { + "$ref": "#/definitions/component.border-width-property" + }, + "border_color": { + "$ref": "#/definitions/component.border-color-property" + }, + "label_no_internet": { + "title": "label no internet", + "description": "A label for the 'Network' component", + "type": "string", + "examples": ["NC"] + }, + "label_ethernet": { + "title": "label ethernet", + "description": "An ethernet label for the 'Network' component", + "type": "string", + "examples": ["Eth"] + }, + "label_wifi_strength_0": { + "title": "label wifi strength 0", + "description": "A 0% strength WiFi label for the 'Network' component", + "type": "string", + "examples": ["WiFi: 0%"] + }, + "label_wifi_strength_25": { + "title": "label wifi strength 25", + "description": "A 25% strength WiFi label for the 'Network' component", + "type": "string", + "examples": ["WiFi: 25%"] + }, + "label_wifi_strength_50": { + "title": "label wifi strength 50", + "description": "A 50% strength WiFi label for the 'Network' component", + "type": "string", + "examples": ["WiFi: 50%"] + }, + "label_wifi_strength_75": { + "title": "label wifi strength 75", + "description": "A 75% strength WiFi label for the 'Network' component", + "type": "string", + "examples": ["WiFi: 75%"] + }, + "label_wifi_strength_100": { + "title": "label wifi strength 100", + "description": "A 100% strength WiFi label for the 'Network' component", + "type": "string", + "examples": ["WiFi: 100%"] + } + }, + "additionalProperties": false + } + }, + { + "if": { + "properties": { + "type": { + "const": "volume" + } + } + }, + "then": { + "properties": { + "type": { + "$ref": "#/definitions/component.type-property" + }, + "margin": { + "$ref": "#/definitions/component.margin-property" + }, + "padding": { + "$ref": "#/definitions/component.padding-property" + }, + "opacity": { + "$ref": "#/definitions/component.opacity-property" + }, + "background": { + "$ref": "#/definitions/component.background-property" + }, + "foreground": { + "$ref": "#/definitions/component.foreground-property" + }, + "font_family": { + "$ref": "#/definitions/component.font-family-property" + }, + "font_size": { + "$ref": "#/definitions/component.font-size-property" + }, + "font_weight": { + "$ref": "#/definitions/component.font-weight-property" + }, + "border_width": { + "$ref": "#/definitions/component.border-width-property" + }, + "border_color": { + "$ref": "#/definitions/component.border-color-property" + }, + "label_low": { + "title": "label low", + "description": "A low volume label for the 'Volume' component", + "type": "string", + "examples": ["🔊{volume_level}%"] + }, + "label_medium": { + "title": "label medium", + "description": "A medium volume label for the 'Volume' component", + "type": "string", + "examples": ["🔊{volume_level}%"] + }, + "label_high": { + "title": "label high", + "description": "A high volume label for the 'Volume' component", + "type": "string", + "examples": ["🔊{volume_level}%"] + }, + "label_mute": { + "title": "label mute", + "description": "A no volume label for the 'Volume' component", + "type": "string", + "examples": ["🔊{volume_level}%"] + } + }, + "additionalProperties": false + } + }, + { + "if": { + "properties": { + "type": { + "const": "text file" + } + } + }, + "then": { + "properties": { + "type": { + "$ref": "#/definitions/component.type-property" + }, + "margin": { + "$ref": "#/definitions/component.margin-property" + }, + "padding": { + "$ref": "#/definitions/component.padding-property" + }, + "opacity": { + "$ref": "#/definitions/component.opacity-property" + }, + "background": { + "$ref": "#/definitions/component.background-property" + }, + "foreground": { + "$ref": "#/definitions/component.foreground-property" + }, + "font_family": { + "$ref": "#/definitions/component.font-family-property" + }, + "font_size": { + "$ref": "#/definitions/component.font-size-property" + }, + "font_weight": { + "$ref": "#/definitions/component.font-weight-property" + }, + "border_width": { + "$ref": "#/definitions/component.border-width-property" + }, + "border_color": { + "$ref": "#/definitions/component.border-color-property" + }, + "file_path": { + "title": "file path", + "description": "A file path for the 'Text File' component", + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + } + }, + { + "if": { + "properties": { + "type": { + "const": "weather" + } + } + }, + "then": { + "properties": { + "type": { + "$ref": "#/definitions/component.type-property" + }, + "margin": { + "$ref": "#/definitions/component.margin-property" + }, + "padding": { + "$ref": "#/definitions/component.padding-property" + }, + "opacity": { + "$ref": "#/definitions/component.opacity-property" + }, + "background": { + "$ref": "#/definitions/component.background-property" + }, + "foreground": { + "$ref": "#/definitions/component.foreground-property" + }, + "font_family": { + "$ref": "#/definitions/component.font-family-property" + }, + "font_size": { + "$ref": "#/definitions/component.font-size-property" + }, + "font_weight": { + "$ref": "#/definitions/component.font-weight-property" + }, + "border_width": { + "$ref": "#/definitions/component.border-width-property" + }, + "border_color": { + "$ref": "#/definitions/component.border-color-property" + }, + "latitude": { + "title": "latitude", + "description": "A latitude for the 'Weather' component", + "type": "number", + "minimum": -90, + "maximum": 90 + }, + "longitude": { + "title": "longitude", + "description": "A longitude for the 'Weather' component", + "type": "number", + "minimum": -180, + "maximum": 180 + }, + "label": { + "title": "label", + "description": "A label for the 'Weather' component", + "type": "string", + "examples": ["{temperature_celsius}°C"] + }, + "label_sun": { + "title": "label sun", + "description": "A sun label for the 'Weather' component", + "type": "string", + "examples": ["☀️ {temperature_celsius}°C"] + }, + "label_moon": { + "title": "label moon", + "description": "A moon label for the 'Weather' component", + "type": "string", + "examples": ["🌙 {temperature_celsius}°C"] + }, + "label_cloud_moon": { + "title": "label cloud moon", + "description": "A cloud moon label for the 'Weather' component", + "type": "string", + "examples": ["🌙☁️ {temperature_celsius}°C"] + }, + "label_cloud_sun": { + "title": "label cloud sun", + "description": "A cloud sun label for the 'Weather' component", + "type": "string", + "examples": ["⛅ {temperature_celsius}°C"] + }, + "label_cloud_moon_rain": { + "title": "label cloud moon rain", + "description": "A cloud moon rain label for the 'Weather' component", + "type": "string", + "examples": ["🌙🌧️ {temperature_celsius}°C"] + }, + "label_cloud_sun_rain": { + "title": "label cloud sun rain", + "description": "A cloud sun rain label for the 'Weather' component", + "type": "string", + "examples": ["🌦️ {temperature_celsius}°C"] + }, + "label_cloud_rain": { + "title": "label cloud rain", + "description": "A cloud rain label for the 'Weather' component", + "type": "string", + "examples": ["🌧️ {temperature_celsius}°C"] + }, + "label_snow_flake": { + "title": "label snow flake", + "description": "A snow flake label for the 'Weather' component", + "type": "string", + "examples": ["❄️ {temperature_celsius}°C"] + }, + "label_thunderstorm": { + "title": "label thunderstorm", + "description": "A thunderstorm label for the 'Weather' component", + "type": "string", + "examples": ["⚡ {temperature_celsius}°C"] + }, + "label_cloud": { + "title": "label cloud", + "description": "A cloud label for the 'Weather' component", + "type": "string", + "examples": ["☁️ {temperature_celsius}°C"] + } + }, + "additionalProperties": false + } + }, + { + "if": { + "properties": { + "type": { + "const": "image" + } + } + }, + "then": { + "properties": { + "type": { + "$ref": "#/definitions/component.type-property" + }, + "margin": { + "$ref": "#/definitions/component.margin-property" + }, + "padding": { + "$ref": "#/definitions/component.padding-property" + }, + "opacity": { + "$ref": "#/definitions/component.opacity-property" + }, + "background": { + "$ref": "#/definitions/component.background-property" + }, + "foreground": { + "$ref": "#/definitions/component.foreground-property" + }, + "font_family": { + "$ref": "#/definitions/component.font-family-property" + }, + "font_size": { + "$ref": "#/definitions/component.font-size-property" + }, + "font_weight": { + "$ref": "#/definitions/component.font-weight-property" + }, + "border_width": { + "$ref": "#/definitions/component.border-width-property" + }, + "border_color": { + "$ref": "#/definitions/component.border-color-property" + }, + "source": { + "title": "source", + "description": "A source path for the 'Image' component", + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + } + }, + { + "if": { + "properties": { + "type": { + "const": "system tray" + } + } + }, + "then": { + "properties": { + "type": { + "$ref": "#/definitions/component.type-property" + }, + "margin": { + "$ref": "#/definitions/component.margin-property" + }, + "padding": { + "$ref": "#/definitions/component.padding-property" + }, + "opacity": { + "$ref": "#/definitions/component.opacity-property" + }, + "background": { + "$ref": "#/definitions/component.background-property" + }, + "foreground": { + "$ref": "#/definitions/component.foreground-property" + }, + "font_family": { + "$ref": "#/definitions/component.font-family-property" + }, + "font_size": { + "$ref": "#/definitions/component.font-size-property" + }, + "font_weight": { + "$ref": "#/definitions/component.font-weight-property" + }, + "border_width": { + "$ref": "#/definitions/component.border-width-property" + }, + "border_color": { + "$ref": "#/definitions/component.border-color-property" + }, + "label_expand_text": { + "title": "label expand text", + "description": "An expand label for the 'System Tray' component", + "type": "string", + "examples": ["<"] + }, + "label_collapse_text": { + "title": "label collapse text", + "description": "An collapse label for the 'System Tray' component", + "type": "string", + "examples": [">"] + } + }, + "additionalProperties": false + } + }, + { + "if": { + "properties": { + "type": { + "const": "music" + } + } + }, + "then": { + "properties": { + "type": { + "$ref": "#/definitions/component.type-property" + }, + "margin": { + "$ref": "#/definitions/component.margin-property" + }, + "padding": { + "$ref": "#/definitions/component.padding-property" + }, + "opacity": { + "$ref": "#/definitions/component.opacity-property" + }, + "background": { + "$ref": "#/definitions/component.background-property" + }, + "foreground": { + "$ref": "#/definitions/component.foreground-property" + }, + "font_family": { + "$ref": "#/definitions/component.font-family-property" + }, + "font_size": { + "$ref": "#/definitions/component.font-size-property" + }, + "font_weight": { + "$ref": "#/definitions/component.font-weight-property" + }, + "border_width": { + "$ref": "#/definitions/component.border-width-property" + }, + "border_color": { + "$ref": "#/definitions/component.border-color-property" + }, + "label_not_playing": { + "title": "label not playing", + "description": "A not playing label for the 'Music' component", + "type": "string" + }, + "label_paused": { + "title": "label paused", + "description": "A paused label for the 'Music' component", + "type": "string", + "examples": ["{song_title} - {artist_name}"] + }, + "label_playing": { + "title": "label playing", + "description": "A playing label for the 'Music' component", + "type": "string", + "examples": ["{song_title} - {artist_name}"] + }, + "max_title_length": { + "title": "max title length", + "description": "A maximum title length for the 'Music' component", + "type": "integer", + "minimum": 0, + "examples": [20] + }, + "max_artist_length": { + "title": "max artist length", + "description": "A maximum artist length for the 'Music' component", + "type": "integer", + "minimum": 0, + "examples": [20] + } + }, + "additionalProperties": false + } + } + ] + } } }, "title": "GlazeWM settings", @@ -353,62 +1351,36 @@ "default": false }, "opacity": { - "title": "opacity", "description": "An opacity of the bar", - "type": "number", - "minimum": 0, - "maximum": 1, - "default": 1 + "$ref": "#/definitions/opacity-property" }, "background": { - "title": "background", "description": "A background of the bar", - "$ref": "#/definitions/color", - "default": "#101010" + "$ref": "#/definitions/background-property" }, "foreground": { - "title": "foreground", "description": "A foreground of the bar", - "$ref": "#/definitions/color", - "default": "white" + "$ref": "#/definitions/foreground-property" }, "font_family": { - "title": "font family", "description": "A font family of the bar", - "type": "string", - "minLength": 1, - "pattern": "^\\S+(\\s+\\S+)*$", - "default": "Segoe UI" + "$ref": "#/definitions/font-family-property" }, "font_size": { - "title": "font size", "description": "A font size of the bar", - "$ref": "#/definitions/length", - "default": "13px" + "$ref": "#/definitions/font-size-property" }, "font_weight": { - "title": "font weight", "description": "A font weight of the bar", - "type": "integer", - "minimum": 0, - "default": 400, - "examples": ["100", "950"] + "$ref": "#/definitions/font-weight-property" }, "border_width": { - "title": "border width", "description": "A border width of the bar", - "type": "string", - "minLength": 1, - "not": { - "$ref": "#/definitions/invalid-shorthand-property" - }, - "default": "0" + "$ref": "#/definitions/border-width-property" }, "border_color": { - "title": "border color", "description": "A border color of the bar", - "$ref": "#/definitions/color", - "default": "blue" + "$ref": "#/definitions/border-color-property" }, "padding": { "title": "padding", @@ -437,6 +1409,21 @@ "description": "A border radius of the bar", "type": "integer", "default": 0 + }, + "components_left": { + "title": "components left", + "description": "Left component settings", + "$ref": "#/definitions/components" + }, + "components_center": { + "title": "components center", + "description": "Center component settings", + "$ref": "#/definitions/components" + }, + "components_right": { + "title": "components right", + "description": "Right component settings", + "$ref": "#/definitions/components" } }, "additionalProperties": false From 4141e8badffab495ddf7b3750536e5afdf9ba2aa Mon Sep 17 00:00:00 2001 From: EmilyGraceSeville7cf Date: Thu, 8 Feb 2024 01:49:40 +1000 Subject: [PATCH 13/19] feat: allow extra properties --- schemas/schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/schema.json b/schemas/schema.json index 08d7ecdec..c3c4423f2 100644 --- a/schemas/schema.json +++ b/schemas/schema.json @@ -1429,5 +1429,5 @@ "additionalProperties": false } }, - "additionalProperties": false + "additionalProperties": true } From f5775cbe7f74647ce8bc449c159e7c66a823b1ca Mon Sep 17 00:00:00 2001 From: EmilyGraceSeville7cf Date: Sun, 11 Feb 2024 05:08:04 +1000 Subject: [PATCH 14/19] feat: update keybinding properties --- schemas/schema.json | 65 +++++++++++++++++++++++++++++---------------- 1 file changed, 42 insertions(+), 23 deletions(-) diff --git a/schemas/schema.json b/schemas/schema.json index c3c4423f2..92693d0e6 100644 --- a/schemas/schema.json +++ b/schemas/schema.json @@ -5,14 +5,15 @@ "pattern": "^\\s+$" }, "invalid-shorthand-property": { - "pattern": "^\\s+$|\\spx\\s|\\spx$|^px\\s|^\\s*\\S+(\\s+\\S+){4,}\\s*$" + "pattern": "^\\s+$|\\spx\\s|\\spx$|^px\\s$" }, "command": { + "title": "command", "description": "A command", "type": "string", "minLength": 1, "not": { - "pattern": "^\\s+$|\\spx\\s|\\spx$|^px\\s|\\b([A-Za-z]+)\\b\\s+\\1|%%" + "pattern": "^\\s+$|\\spx\\s|\\spx$|^px\\s" }, "examples": [ "focus left", @@ -47,6 +48,7 @@ ] }, "binding": { + "title": "binding", "description": "A binding", "type": "string", "not": { @@ -54,6 +56,26 @@ }, "examples": ["Alt+H"] }, + "commands": { + "title": "commands", + "description": "Commands", + "type": "array", + "uniqueItems": true, + "minItems": 2, + "items": { + "$ref": "#/definitions/command" + } + }, + "bindings": { + "title": "bindings", + "description": "Bindings", + "type": "array", + "uniqueItems": true, + "minItems": 2, + "items": { + "$ref": "#/definitions/binding" + } + }, "color": { "type": "string", "pattern": "^\\S+$", @@ -1155,11 +1177,20 @@ { "properties": { "binding": { - "title": "binding", "$ref": "#/definitions/binding" }, "command": { - "title": "command", + "$ref": "#/definitions/command" + } + }, + "additionalProperties": false + }, + { + "properties": { + "bindings": { + "$ref": "#/definitions/bindings" + }, + "command": { "$ref": "#/definitions/command" } }, @@ -1168,17 +1199,10 @@ { "properties": { "binding": { - "title": "binding", "$ref": "#/definitions/binding" }, "commands": { - "title": "commands", - "type": "array", - "uniqueItems": true, - "minItems": 2, - "items": { - "$ref": "#/definitions/command" - } + "$ref": "#/definitions/commands" } }, "additionalProperties": false @@ -1186,22 +1210,17 @@ { "properties": { "bindings": { - "title": "bindings", - "type": "array", - "uniqueItems": true, - "minItems": 2, - "items": { - "$ref": "#/definitions/binding" - } + "$ref": "#/definitions/bindings" }, - "command": { - "title": "command", - "$ref": "#/definitions/command" + "commands": { + "$ref": "#/definitions/commands" } }, "additionalProperties": false } - ] + ], + "minProperties": 2, + "maxProperties": 2 }, "additionalProperties": false }, From 5377dc6aff91d8c313a61a7b58cd243817afcec1 Mon Sep 17 00:00:00 2001 From: EmilyGraceSeville7cf Date: Sun, 11 Feb 2024 05:20:49 +1000 Subject: [PATCH 15/19] feat: add documentation urls --- schemas/schema.json | 210 ++++++++++++++++++++++---------------------- 1 file changed, 105 insertions(+), 105 deletions(-) diff --git a/schemas/schema.json b/schemas/schema.json index 92693d0e6..299335652 100644 --- a/schemas/schema.json +++ b/schemas/schema.json @@ -9,7 +9,7 @@ }, "command": { "title": "command", - "description": "A command", + "description": "A command\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#available-commands", "type": "string", "minLength": 1, "not": { @@ -49,7 +49,7 @@ }, "binding": { "title": "binding", - "description": "A binding", + "description": "A binding\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#keybindings", "type": "string", "not": { "pattern": "^\\s+$" @@ -58,7 +58,7 @@ }, "commands": { "title": "commands", - "description": "Commands", + "description": "Commands\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#available-commands", "type": "array", "uniqueItems": true, "minItems": 2, @@ -68,7 +68,7 @@ }, "bindings": { "title": "bindings", - "description": "Bindings", + "description": "Bindings\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#keybindings", "type": "array", "uniqueItems": true, "minItems": 2, @@ -165,7 +165,7 @@ }, "component.type-property": { "title": "type", - "description": "A type of the component", + "description": "A type of the component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-configuration", "type": "string", "minLength": 1, "pattern": "\\S", @@ -185,7 +185,7 @@ }, "component.margin-property": { "title": "margin", - "description": "A margin of the component", + "description": "A margin of the component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-configuration", "type": "string", "minLength": 1, "not": { @@ -194,46 +194,46 @@ "default": "0 10px 0 0" }, "component.padding-property": { - "description": "A padding of the component", + "description": "A padding of the component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-configuration", "$ref": "#/definitions/padding-property" }, "component.opacity-property": { - "description": "An opacity of the component", + "description": "An opacity of the component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-configuration", "$ref": "#/definitions/opacity-property" }, "component.background-property": { - "description": "A background of the component", + "description": "A background of the component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-configuration", "$ref": "#/definitions/background-property" }, "component.foreground-property": { - "description": "A foreground of the component", + "description": "A foreground of the component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-configuration", "$ref": "#/definitions/foreground-property" }, "component.font-family-property": { - "description": "A font family of the component", + "description": "A font family of the component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-configuration", "$ref": "#/definitions/font-family-property" }, "component.font-size-property": { - "description": "A font size of the component", + "description": "A font size of the component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-configuration", "$ref": "#/definitions/font-size-property" }, "component.font-weight-property": { - "description": "A font weight of the component", + "description": "A font weight of the component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-configuration", "$ref": "#/definitions/font-weight-property" }, "component.border-width-property": { - "description": "A border width of the component", + "description": "A border width of the component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-configuration", "$ref": "#/definitions/border-width-property" }, "component.border-color-property": { - "description": "A border color of the component", + "description": "A border color of the component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-configuration", "$ref": "#/definitions/border-color-property" }, "components": { "uniqueItems": true, "minItems": 1, "items": { - "description": "Component settings", + "description": "Component settings\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-configuration", "type": "object", "properties": { "type": { @@ -316,7 +316,7 @@ }, "time_formatting": { "title": "time formatting", - "description": "A time formatting of the 'Clock' component", + "description": "A time formatting of the 'Clock' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-clock", "type": "string", "examples": ["hh:mm tt ddd MMM d"] } @@ -369,19 +369,19 @@ }, "label_draining": { "title": "label draining", - "description": "A draining label of the 'Battery' component", + "description": "A draining label of the 'Battery' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-battery", "type": "string", "examples": ["{battery_level}% remaining"] }, "label_power_saver": { "title": "label power saver", - "description": "A power saver label of the 'Battery' component", + "description": "A power saver label of the 'Battery' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-battery", "type": "string", "examples": ["{battery_level}% (power saver)"] }, "label_charging": { "title": "label charging", - "description": "A charging label of the 'Battery' component", + "description": "A charging label of the 'Battery' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-battery", "type": "string", "examples": ["{battery_level}% (charging)"] } @@ -434,13 +434,13 @@ }, "label": { "title": "label", - "description": "A label for the 'CPU Usage' component", + "description": "A label for the 'CPU Usage' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-cpu-usage", "type": "string", "examples": ["CPU: {percent_usage}%"] }, "refresh_interval_ms": { "title": "refresh interval ms", - "description": "A refresh interval for the 'CPU Usage' component", + "description": "A refresh interval for the 'CPU Usage' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-cpu-usage", "type": "integer", "minimum": 0, "examples": [1000] @@ -494,13 +494,13 @@ }, "label": { "title": "label", - "description": "A label for the 'GPU Usage' component", + "description": "A label for the 'GPU Usage' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-gpu-usage", "type": "string", "examples": ["GPU: {percent_usage}%"] }, "refresh_interval_ms": { "title": "refresh interval ms", - "description": "A refresh interval for the 'GPU Usage' component", + "description": "A refresh interval for the 'GPU Usage' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-gpu-usage", "type": "integer", "minimum": 0, "examples": [1000] @@ -554,13 +554,13 @@ }, "label": { "title": "label", - "description": "A label for the 'Memory Usage' component", + "description": "A label for the 'Memory Usage' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-memory-usage", "type": "string", "examples": ["RAM: {percent_usage}%"] }, "refresh_interval_ms": { "title": "refresh interval ms", - "description": "A refresh interval for the 'Memory Usage' component", + "description": "A refresh interval for the 'Memory Usage' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-memory-usage", "type": "integer", "minimum": 0, "examples": [1000] @@ -614,43 +614,43 @@ }, "label_no_internet": { "title": "label no internet", - "description": "A label for the 'Network' component", + "description": "A label for the 'Network' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-network", "type": "string", "examples": ["NC"] }, "label_ethernet": { "title": "label ethernet", - "description": "An ethernet label for the 'Network' component", + "description": "An ethernet label for the 'Network' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-network", "type": "string", "examples": ["Eth"] }, "label_wifi_strength_0": { "title": "label wifi strength 0", - "description": "A 0% strength WiFi label for the 'Network' component", + "description": "A 0% strength WiFi label for the 'Network' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-network", "type": "string", "examples": ["WiFi: 0%"] }, "label_wifi_strength_25": { "title": "label wifi strength 25", - "description": "A 25% strength WiFi label for the 'Network' component", + "description": "A 25% strength WiFi label for the 'Network' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-network", "type": "string", "examples": ["WiFi: 25%"] }, "label_wifi_strength_50": { "title": "label wifi strength 50", - "description": "A 50% strength WiFi label for the 'Network' component", + "description": "A 50% strength WiFi label for the 'Network' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-network", "type": "string", "examples": ["WiFi: 50%"] }, "label_wifi_strength_75": { "title": "label wifi strength 75", - "description": "A 75% strength WiFi label for the 'Network' component", + "description": "A 75% strength WiFi label for the 'Network' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-network", "type": "string", "examples": ["WiFi: 75%"] }, "label_wifi_strength_100": { "title": "label wifi strength 100", - "description": "A 100% strength WiFi label for the 'Network' component", + "description": "A 100% strength WiFi label for the 'Network' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-network", "type": "string", "examples": ["WiFi: 100%"] } @@ -703,25 +703,25 @@ }, "label_low": { "title": "label low", - "description": "A low volume label for the 'Volume' component", + "description": "A low volume label for the 'Volume' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-volume", "type": "string", "examples": ["🔊{volume_level}%"] }, "label_medium": { "title": "label medium", - "description": "A medium volume label for the 'Volume' component", + "description": "A medium volume label for the 'Volume' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-volume", "type": "string", "examples": ["🔊{volume_level}%"] }, "label_high": { "title": "label high", - "description": "A high volume label for the 'Volume' component", + "description": "A high volume label for the 'Volume' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-volume", "type": "string", "examples": ["🔊{volume_level}%"] }, "label_mute": { "title": "label mute", - "description": "A no volume label for the 'Volume' component", + "description": "A no volume label for the 'Volume' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-volume", "type": "string", "examples": ["🔊{volume_level}%"] } @@ -774,7 +774,7 @@ }, "file_path": { "title": "file path", - "description": "A file path for the 'Text File' component", + "description": "A file path for the 'Text File' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-text-file", "type": "string", "minLength": 1 } @@ -827,81 +827,81 @@ }, "latitude": { "title": "latitude", - "description": "A latitude for the 'Weather' component", + "description": "A latitude for the 'Weather' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-weather", "type": "number", "minimum": -90, "maximum": 90 }, "longitude": { "title": "longitude", - "description": "A longitude for the 'Weather' component", + "description": "A longitude for the 'Weather' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-weather", "type": "number", "minimum": -180, "maximum": 180 }, "label": { "title": "label", - "description": "A label for the 'Weather' component", + "description": "A label for the 'Weather' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-weather", "type": "string", "examples": ["{temperature_celsius}°C"] }, "label_sun": { "title": "label sun", - "description": "A sun label for the 'Weather' component", + "description": "A sun label for the 'Weather' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-weather", "type": "string", "examples": ["☀️ {temperature_celsius}°C"] }, "label_moon": { "title": "label moon", - "description": "A moon label for the 'Weather' component", + "description": "A moon label for the 'Weather' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-weather", "type": "string", "examples": ["🌙 {temperature_celsius}°C"] }, "label_cloud_moon": { "title": "label cloud moon", - "description": "A cloud moon label for the 'Weather' component", + "description": "A cloud moon label for the 'Weather' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-weather", "type": "string", "examples": ["🌙☁️ {temperature_celsius}°C"] }, "label_cloud_sun": { "title": "label cloud sun", - "description": "A cloud sun label for the 'Weather' component", + "description": "A cloud sun label for the 'Weather' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-weather", "type": "string", "examples": ["⛅ {temperature_celsius}°C"] }, "label_cloud_moon_rain": { "title": "label cloud moon rain", - "description": "A cloud moon rain label for the 'Weather' component", + "description": "A cloud moon rain label for the 'Weather' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-weather", "type": "string", "examples": ["🌙🌧️ {temperature_celsius}°C"] }, "label_cloud_sun_rain": { "title": "label cloud sun rain", - "description": "A cloud sun rain label for the 'Weather' component", + "description": "A cloud sun rain label for the 'Weather' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-weather", "type": "string", "examples": ["🌦️ {temperature_celsius}°C"] }, "label_cloud_rain": { "title": "label cloud rain", - "description": "A cloud rain label for the 'Weather' component", + "description": "A cloud rain label for the 'Weather' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-weather", "type": "string", "examples": ["🌧️ {temperature_celsius}°C"] }, "label_snow_flake": { "title": "label snow flake", - "description": "A snow flake label for the 'Weather' component", + "description": "A snow flake label for the 'Weather' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-weather", "type": "string", "examples": ["❄️ {temperature_celsius}°C"] }, "label_thunderstorm": { "title": "label thunderstorm", - "description": "A thunderstorm label for the 'Weather' component", + "description": "A thunderstorm label for the 'Weather' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-weather", "type": "string", "examples": ["⚡ {temperature_celsius}°C"] }, "label_cloud": { "title": "label cloud", - "description": "A cloud label for the 'Weather' component", + "description": "A cloud label for the 'Weather' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-weather", "type": "string", "examples": ["☁️ {temperature_celsius}°C"] } @@ -954,7 +954,7 @@ }, "source": { "title": "source", - "description": "A source path for the 'Image' component", + "description": "A source path for the 'Image' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-image", "type": "string", "minLength": 1 } @@ -1007,13 +1007,13 @@ }, "label_expand_text": { "title": "label expand text", - "description": "An expand label for the 'System Tray' component", + "description": "An expand label for the 'System Tray' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-system-tray", "type": "string", "examples": ["<"] }, "label_collapse_text": { "title": "label collapse text", - "description": "An collapse label for the 'System Tray' component", + "description": "An collapse label for the 'System Tray' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-system-tray", "type": "string", "examples": [">"] } @@ -1066,31 +1066,31 @@ }, "label_not_playing": { "title": "label not playing", - "description": "A not playing label for the 'Music' component", + "description": "A not playing label for the 'Music' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-music", "type": "string" }, "label_paused": { "title": "label paused", - "description": "A paused label for the 'Music' component", + "description": "A paused label for the 'Music' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-music", "type": "string", "examples": ["{song_title} - {artist_name}"] }, "label_playing": { "title": "label playing", - "description": "A playing label for the 'Music' component", + "description": "A playing label for the 'Music' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-music", "type": "string", "examples": ["{song_title} - {artist_name}"] }, "max_title_length": { "title": "max title length", - "description": "A maximum title length for the 'Music' component", + "description": "A maximum title length for the 'Music' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-music", "type": "integer", "minimum": 0, "examples": [20] }, "max_artist_length": { "title": "max artist length", - "description": "A maximum artist length for the 'Music' component", + "description": "A maximum artist length for the 'Music' component\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-component-music", "type": "integer", "minimum": 0, "examples": [20] @@ -1109,36 +1109,36 @@ "properties": { "general": { "title": "general", - "description": "General settings", + "description": "General settings\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#general", "type": "object", "properties": { "focus_follows_cursor": { "title": "focus follows cursor", - "description": "Whether to automatically focus windows underneath the cursor", + "description": "Whether to automatically focus windows underneath the cursor\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#general", "type": "boolean", "default": false }, "cursor_follows_focus": { "title": "cursor follows focus", - "description": "Whether to jump the cursor between windows focused by the WM", + "description": "Whether to jump the cursor between windows focused by the WM\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#general", "type": "boolean", "default": false }, "toggle_workspace_on_refocus": { "title": "toggle workspace on refocus", - "description": "Whether to switch back and forth between the previously focused workspace when focusing the current workspace", + "description": "Whether to switch back and forth between the previously focused workspace when focusing the current workspace\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#general", "type": "boolean", "default": true }, "show_floating_on_top": { "title": "show floating on top", - "description": "Whether to show floating windows as always on top", + "description": "Whether to show floating windows as always on top\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#general", "type": "boolean", "default": false }, "floating_window_move_amount": { "title": "floating window move amount", - "description": "An amount to move floating windows by", + "description": "An amount to move floating windows by\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#general", "type": "string", "minLength": 2, "pattern": "^\\d+%$", @@ -1146,13 +1146,13 @@ }, "center_new_floating_windows": { "title": "center new floating windows", - "description": "Whether to center new floating windows", + "description": "Whether to center new floating windows\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#general", "type": "boolean", "default": true }, "window_animations": { "title": "window animations", - "description": "Whether to enable window transition animations", + "description": "Whether to enable window transition animations\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#general", "oneOf": [ { "type": "boolean" @@ -1166,12 +1166,12 @@ }, "keybindings": { "title": "keybindings", - "description": "Keybindings", + "description": "Keybindings\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#keybindings", "type": "array", "uniqueItems": true, "minItems": 1, "items": { - "description": "A keybinding", + "description": "A keybinding\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#keybindings", "type": "object", "oneOf": [ { @@ -1226,23 +1226,23 @@ }, "focus_borders": { "title": "focus borders", - "description": "Focus settings", + "description": "Focus settings\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#focus-window-border-configuration", "type": "object", "properties": { "active": { "title": "active", - "description": "An active border", + "description": "An active border\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#focus-window-border-configuration", "type": "object", "properties": { "enabled": { "title": "enabled", - "description": "Whether to enable the active border", + "description": "Whether to enable the active border\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#focus-window-border-configuration", "type": "boolean", "default": true }, "color": { "title": "color", - "description": "A color of the active border", + "description": "A color of the active border\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#focus-window-border-configuration", "$ref": "#/definitions/color" } }, @@ -1250,18 +1250,18 @@ }, "inactive": { "title": "inactive", - "description": "An inactive border", + "description": "An inactive border\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#focus-window-border-configuration", "type": "object", "properties": { "enabled": { "title": "enabled", - "description": "Whether to enable the inactive border", + "description": "Whether to enable the inactive border\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#focus-window-border-configuration", "type": "boolean", "default": false }, "color": { "title": "color", - "description": "A color of the active border", + "description": "A color of the active border\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#focus-window-border-configuration", "$ref": "#/definitions/color" } }, @@ -1272,12 +1272,12 @@ }, "gaps": { "title": "gaps", - "description": "Gap settings", + "description": "Gap settings\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#gap-configuration", "type": "object", "properties": { "inner_gap": { "title": "inner gap", - "description": "An inner gap", + "description": "An inner gap\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#gap-configuration", "type": "string", "minLength": 1, "not": { @@ -1287,7 +1287,7 @@ }, "outer_gap": { "title": "outer gap", - "description": "An outer gap", + "description": "An outer gap\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#gap-configuration", "type": "string", "minLength": 1, "not": { @@ -1300,17 +1300,17 @@ }, "workspaces": { "title": "workspaces", - "description": "Workspace settings", + "description": "Workspace settings\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#workspaces-configuration", "type": "array", "uniqueItems": true, "minItems": 1, "items": { - "description": "A workspace setting", + "description": "A workspace setting\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#workspaces-configuration", "type": "object", "properties": { "name": { "title": "name", - "description": "A unique name of the workspace", + "description": "A unique name of the workspace\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#workspaces-configuration", "type": "string", "minLength": 1, "pattern": "\\S", @@ -1318,7 +1318,7 @@ }, "display_name": { "title": "display name", - "description": "A display name of the workspace", + "description": "A display name of the workspace\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#workspaces-configuration", "type": "string", "minLength": 1, "pattern": "\\S", @@ -1326,12 +1326,12 @@ }, "bind_to_monitor": { "title": "bind to monitor", - "description": "Whether to bind the workspace to a specific monitor", + "description": "Whether to bind the workspace to a specific monitor\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#workspaces-configuration", "type": "boolean" }, "keep_alive": { "title": "keep alive", - "description": "Whether not to destroy the workspace when it's empty", + "description": "Whether not to destroy the workspace when it's empty\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#workspaces-configuration", "type": "boolean", "default": false } @@ -1341,69 +1341,69 @@ }, "bar": { "title": "bar", - "description": "Bar settings", + "description": "Bar settings\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-configuration", "type": "object", "properties": { "enabled": { "title": "title", - "description": "Whether to enable the bar", + "description": "Whether to enable the bar\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-configuration", "type": "boolean", "default": true }, "height": { "title": "height", - "description": "A height of the bar", + "description": "A height of the bar\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-configuration", "$ref": "#/definitions/length", "default": "30px" }, "position": { "title": "position", - "description": "A position of the bar", + "description": "A position of the bar\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-configuration", "type": "string", "enum": ["top", "bottom"], "default": "top" }, "always_on_top": { "title": "always on top", - "description": "Whether to keep the bar above other windows", + "description": "Whether to keep the bar above other windows\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-configuration", "type": "boolean", "default": false }, "opacity": { - "description": "An opacity of the bar", + "description": "An opacity of the bar\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-configuration", "$ref": "#/definitions/opacity-property" }, "background": { - "description": "A background of the bar", + "description": "A background of the bar\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-configuration", "$ref": "#/definitions/background-property" }, "foreground": { - "description": "A foreground of the bar", + "description": "A foreground of the bar\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-configuration", "$ref": "#/definitions/foreground-property" }, "font_family": { - "description": "A font family of the bar", + "description": "A font family of the bar\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-configuration", "$ref": "#/definitions/font-family-property" }, "font_size": { - "description": "A font size of the bar", + "description": "A font size of the bar\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-configuration", "$ref": "#/definitions/font-size-property" }, "font_weight": { - "description": "A font weight of the bar", + "description": "A font weight of the bar\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-configuration", "$ref": "#/definitions/font-weight-property" }, "border_width": { - "description": "A border width of the bar", + "description": "A border width of the bar\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-configuration", "$ref": "#/definitions/border-width-property" }, "border_color": { - "description": "A border color of the bar", + "description": "A border color of the bar\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-configuration", "$ref": "#/definitions/border-color-property" }, "padding": { "title": "padding", - "description": "A padding of the bar", + "description": "A padding of the bar\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-configuration", "type": "string", "minLength": 1, "not": { @@ -1413,35 +1413,35 @@ }, "offset_x": { "title": "offset x", - "description": "A horizontal offset of the bar", + "description": "A horizontal offset of the bar\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-configuration", "type": "integer", "default": 0 }, "offset_y": { "title": "offset y", - "description": "A vertical offset of the bar", + "description": "A vertical offset of the bar\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-configuration", "type": "integer", "default": 0 }, "border_radius": { "title": "border radius", - "description": "A border radius of the bar", + "description": "A border radius of the bar\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-configuration", "type": "integer", "default": 0 }, "components_left": { "title": "components left", - "description": "Left component settings", + "description": "Left component settings\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-configuration", "$ref": "#/definitions/components" }, "components_center": { "title": "components center", - "description": "Center component settings", + "description": "Center component settings\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-configuration", "$ref": "#/definitions/components" }, "components_right": { "title": "components right", - "description": "Right component settings", + "description": "Right component settings\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#bar-configuration", "$ref": "#/definitions/components" } }, From 5648c9aa85e061bb0aee9222fd14ad7715136cd9 Mon Sep 17 00:00:00 2001 From: EmilyGraceSeville7cf Date: Sun, 11 Feb 2024 05:30:47 +1000 Subject: [PATCH 16/19] feat: support window rules --- schemas/schema.json | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/schemas/schema.json b/schemas/schema.json index 299335652..5915c57f1 100644 --- a/schemas/schema.json +++ b/schemas/schema.json @@ -1446,6 +1446,42 @@ } }, "additionalProperties": false + }, + "window_rules": { + "title": "windows rules", + "description": "Windows rule settings\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#window-rules", + "type": "array", + "uniqueItems": true, + "items": { + "type": "object", + "properties": { + "command": { + "$ref": "#/definitions/command" + }, + "match_process_name": { + "title": "match process name", + "description": "A process name to match\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#window-rules", + "type": "string", + "minLength": 1, + "examples": ["chrome"] + }, + "match_title": { + "title": "match title", + "description": "A window title to match\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#window-rules", + "type": "string", + "minLength": 1, + "examples": ["/.*/"] + }, + "match_class_name": { + "title": "match class name", + "description": "A class name to match\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#window-rules", + "type": "string", + "minLength": 1, + "examples": ["Chrome_WidgetWin_1"] + } + }, + "additionalProperties": false + } } }, "additionalProperties": true From 7ff56372128ff4360556d114b61f5015bdac41bc Mon Sep 17 00:00:00 2001 From: EmilyGraceSeville7cf Date: Sun, 11 Feb 2024 08:14:29 +1000 Subject: [PATCH 17/19] fix: regex --- schemas/schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schemas/schema.json b/schemas/schema.json index 5915c57f1..7e710b490 100644 --- a/schemas/schema.json +++ b/schemas/schema.json @@ -5,7 +5,7 @@ "pattern": "^\\s+$" }, "invalid-shorthand-property": { - "pattern": "^\\s+$|\\spx\\s|\\spx$|^px\\s$" + "pattern": "^\\s+$|\\spx\\s|\\spx$|^px" }, "command": { "title": "command", @@ -13,7 +13,7 @@ "type": "string", "minLength": 1, "not": { - "pattern": "^\\s+$|\\spx\\s|\\spx$|^px\\s" + "$ref": "#/definitions/invalid-shorthand-property" }, "examples": [ "focus left", From 6c3c8e9816c75c396fbc19682db6c0220239874d Mon Sep 17 00:00:00 2001 From: EmilyGraceSeville7cf Date: Sat, 18 May 2024 20:14:41 +1000 Subject: [PATCH 18/19] fix: bind_to_monitor property --- schemas/schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schemas/schema.json b/schemas/schema.json index 7e710b490..bfb522e37 100644 --- a/schemas/schema.json +++ b/schemas/schema.json @@ -1326,8 +1326,8 @@ }, "bind_to_monitor": { "title": "bind to monitor", - "description": "Whether to bind the workspace to a specific monitor\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#workspaces-configuration", - "type": "boolean" + "description": "A monitor number workspace is expected to be on\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#workspaces-configuration", + "type": "integer" }, "keep_alive": { "title": "keep alive", From b359d47ad365f21990eb0974367dc50486a5d917 Mon Sep 17 00:00:00 2001 From: EmilyGraceSeville7cf Date: Sat, 18 May 2024 20:16:40 +1000 Subject: [PATCH 19/19] feat: constrain bind_to_monitor to 1.. range --- schemas/schema.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/schemas/schema.json b/schemas/schema.json index bfb522e37..91e8373ff 100644 --- a/schemas/schema.json +++ b/schemas/schema.json @@ -1327,7 +1327,8 @@ "bind_to_monitor": { "title": "bind to monitor", "description": "A monitor number workspace is expected to be on\nhttps://github.com/glzr-io/glazewm?tab=readme-ov-file#workspaces-configuration", - "type": "integer" + "type": "integer", + "minimum": 1 }, "keep_alive": { "title": "keep alive",