feat(wm): add replace configuration socket message

This commit introduces a new SocketMessage, ReplaceConfiguration, which
attempts to replace a running instance of WindowManager with another
created from a (presumably) different komorebi.json file.

This will likely be useful for people who have multiple different
monitor setups that they connect and disconnect from throughout the day,
but definitely needs more testing.

An experimental sub-widget which calls this SocketMessage has been added
to komorebi-bar to aid with initial testing.
This commit is contained in:
LGUG2Z
2024-09-17 21:09:11 -07:00
parent 21a2138330
commit 2916256e79
12 changed files with 292 additions and 69 deletions

View File

@@ -1320,9 +1320,41 @@
"type": "object",
"required": [
"name",
"type"
"palette"
],
"properties": {
"bar_accent": {
"description": "Komorebi status bar accent (default: Blue)",
"type": "string",
"enum": [
"Rosewater",
"Flamingo",
"Pink",
"Mauve",
"Red",
"Maroon",
"Peach",
"Yellow",
"Green",
"Teal",
"Sky",
"Sapphire",
"Blue",
"Lavender",
"Text",
"Subtext1",
"Subtext0",
"Overlay2",
"Overlay1",
"Overlay0",
"Surface2",
"Surface1",
"Surface0",
"Base",
"Mantle",
"Crust"
]
},
"monocle_border": {
"description": "Border colour when the container is in monocle mode (default: Pink)",
"type": "string",
@@ -1365,6 +1397,12 @@
"Mocha"
]
},
"palette": {
"type": "string",
"enum": [
"Catppuccin"
]
},
"single_border": {
"description": "Border colour when the container contains a single window (default: Blue)",
"type": "string",
@@ -1525,12 +1563,6 @@
"Crust"
]
},
"type": {
"type": "string",
"enum": [
"Catppuccin"
]
},
"unfocused_border": {
"description": "Border colour when the container is unfocused (default: Base)",
"type": "string",
@@ -1570,9 +1602,31 @@
"type": "object",
"required": [
"name",
"type"
"palette"
],
"properties": {
"bar_accent": {
"description": "Komorebi status bar accent (default: Base0D)",
"type": "string",
"enum": [
"Base00",
"Base01",
"Base02",
"Base03",
"Base04",
"Base05",
"Base06",
"Base07",
"Base08",
"Base09",
"Base0A",
"Base0B",
"Base0C",
"Base0D",
"Base0E",
"Base0F"
]
},
"monocle_border": {
"description": "Border colour when the container is in monocle mode (default: Base0F)",
"type": "string",
@@ -1870,6 +1924,12 @@
"Zenburn"
]
},
"palette": {
"type": "string",
"enum": [
"Base16"
]
},
"single_border": {
"description": "Border colour when the container contains a single window (default: Base0D)",
"type": "string",
@@ -1980,12 +2040,6 @@
"Base0F"
]
},
"type": {
"type": "string",
"enum": [
"Base16"
]
},
"unfocused_border": {
"description": "Border colour when the container is unfocused (default: Base01)",
"type": "string",