refactor(theme): centralize theme-related code in komorebi-themes

Getting tired of making little changes in both this and the komorebi for
Mac repo - I think eventually either komorebi-themes will live in its
own repo or komorebi for Mac will be integrated here.

But for now, at least everything is defined in komorebi-themes and I
don't have to redefine any theme-related stuff in komorebi for Mac.
This commit is contained in:
LGUG2Z
2025-12-27 21:58:37 -08:00
parent f77a303b30
commit 0758c7d900
8 changed files with 1258 additions and 1113 deletions

View File

@@ -2846,423 +2846,450 @@
"oneOf": [
{
"title": "Catppuccin",
"description": "A theme from catppuccin-egui",
"description": "Theme from catppuccin-egui",
"type": "object",
"properties": {
"bar_accent": {
"description": "Komorebi status bar accent",
"anyOf": [
{
"$ref": "#/$defs/CatppuccinValue"
},
{
"type": "null"
}
],
"default": "Blue"
},
"floating_border": {
"description": "Border colour when the window is floating",
"anyOf": [
{
"$ref": "#/$defs/CatppuccinValue"
},
{
"type": "null"
}
],
"default": "Yellow"
},
"monocle_border": {
"description": "Border colour when the container is in monocle mode",
"anyOf": [
{
"$ref": "#/$defs/CatppuccinValue"
},
{
"type": "null"
}
],
"default": "Pink"
},
"name": {
"description": "Name of the Catppuccin theme (theme previews: https://github.com/catppuccin/catppuccin)",
"$ref": "#/$defs/Catppuccin"
},
"palette": {
"type": "string",
"const": "Catppuccin"
},
"single_border": {
"description": "Border colour when the container contains a single window",
"anyOf": [
{
"$ref": "#/$defs/CatppuccinValue"
},
{
"type": "null"
}
],
"default": "Blue"
},
"stack_border": {
"description": "Border colour when the container contains multiple windows",
"anyOf": [
{
"$ref": "#/$defs/CatppuccinValue"
},
{
"type": "null"
}
],
"default": "Green"
},
"stackbar_background": {
"description": "Stackbar tab background colour",
"anyOf": [
{
"$ref": "#/$defs/CatppuccinValue"
},
{
"type": "null"
}
],
"default": "Base"
},
"stackbar_focused_text": {
"description": "Stackbar focused tab text colour",
"anyOf": [
{
"$ref": "#/$defs/CatppuccinValue"
},
{
"type": "null"
}
],
"default": "Green"
},
"stackbar_unfocused_text": {
"description": "Stackbar unfocused tab text colour",
"anyOf": [
{
"$ref": "#/$defs/CatppuccinValue"
},
{
"type": "null"
}
],
"default": "Text"
},
"unfocused_border": {
"description": "Border colour when the container is unfocused",
"anyOf": [
{
"$ref": "#/$defs/CatppuccinValue"
},
{
"type": "null"
}
],
"default": "Base"
},
"unfocused_locked_border": {
"description": "Border colour when the container is unfocused and locked",
"anyOf": [
{
"$ref": "#/$defs/CatppuccinValue"
},
{
"type": "null"
}
],
"default": "Red"
}
},
"$ref": "#/$defs/KomorebiThemeCatppuccin",
"required": [
"palette",
"name"
"palette"
]
},
{
"title": "Base16",
"description": "A theme from base16-egui-themes",
"description": "Theme from base16-egui-themes",
"type": "object",
"properties": {
"bar_accent": {
"description": "Komorebi status bar accent",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base0D"
},
"floating_border": {
"description": "Border colour when the window is floating",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base09"
},
"monocle_border": {
"description": "Border colour when the container is in monocle mode",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base0F"
},
"name": {
"description": "Name of the Base16 theme (theme previews: https://tinted-theming.github.io/tinted-gallery/)",
"$ref": "#/$defs/Base16"
},
"palette": {
"type": "string",
"const": "Base16"
},
"single_border": {
"description": "Border colour when the container contains a single window",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base0D"
},
"stack_border": {
"description": "Border colour when the container contains multiple windows",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base0B"
},
"stackbar_background": {
"description": "Stackbar tab background colour",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base01"
},
"stackbar_focused_text": {
"description": "Stackbar focused tab text colour",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base0B"
},
"stackbar_unfocused_text": {
"description": "Stackbar unfocused tab text colour",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base05"
},
"unfocused_border": {
"description": "Border colour when the container is unfocused",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base01"
},
"unfocused_locked_border": {
"description": "Border colour when the container is unfocused and locked",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base08"
}
},
"$ref": "#/$defs/KomorebiThemeBase16",
"required": [
"palette",
"name"
"palette"
]
},
{
"title": "Custom",
"description": "A custom Base16 theme",
"description": "Custom Base16 theme",
"type": "object",
"properties": {
"bar_accent": {
"description": "Komorebi status bar accent",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base0D"
},
"colours": {
"description": "Colours of the custom Base16 theme palette",
"$ref": "#/$defs/Base16ColourPalette"
},
"floating_border": {
"description": "Border colour when the window is floating",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base09"
},
"monocle_border": {
"description": "Border colour when the container is in monocle mode",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base0F"
},
"palette": {
"type": "string",
"const": "Custom"
},
"single_border": {
"description": "Border colour when the container contains a single window",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base0D"
},
"stack_border": {
"description": "Border colour when the container contains multiple windows",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base0B"
},
"stackbar_background": {
"description": "Stackbar tab background colour",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base01"
},
"stackbar_focused_text": {
"description": "Stackbar focused tab text colour",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base0B"
},
"stackbar_unfocused_text": {
"description": "Stackbar unfocused tab text colour",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base05"
},
"unfocused_border": {
"description": "Border colour when the container is unfocused",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base01"
},
"unfocused_locked_border": {
"description": "Border colour when the container is unfocused and locked",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base08"
}
},
"$ref": "#/$defs/KomorebiThemeCustom",
"required": [
"palette",
"colours"
"palette"
]
}
]
},
"KomorebiThemeBase16": {
"description": "Theme from base16-egui-themes",
"type": "object",
"properties": {
"bar_accent": {
"description": "Bar accent colour",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base0D"
},
"floating_border": {
"description": "Floating window border colour",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base09"
},
"monocle_border": {
"description": "Monocle window border colour",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base0F"
},
"name": {
"description": "Name of the Base16 theme (theme previews: https://tinted-theming.github.io/tinted-gallery/)",
"$ref": "#/$defs/Base16"
},
"single_border": {
"description": "Single window border colour",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base0D"
},
"stack_border": {
"description": "Stack window border colour",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base0B"
},
"stackbar_background": {
"description": "Stackbar background colour",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base01"
},
"stackbar_focused_text": {
"description": "Stackbar focused text colour",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base0B"
},
"stackbar_unfocused_text": {
"description": "Stackbar unfocused text colour",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base05"
},
"unfocused_border": {
"description": "Unfocused window border colour",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base01"
},
"unfocused_locked_border": {
"description": "Unfocused locked window border colour",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base08"
}
},
"required": [
"name"
]
},
"KomorebiThemeCatppuccin": {
"description": "Theme from catppuccin-egui",
"type": "object",
"properties": {
"bar_accent": {
"description": "Bar accent colour",
"anyOf": [
{
"$ref": "#/$defs/CatppuccinValue"
},
{
"type": "null"
}
],
"default": "Blue"
},
"floating_border": {
"description": "Floating window border colour",
"anyOf": [
{
"$ref": "#/$defs/CatppuccinValue"
},
{
"type": "null"
}
],
"default": "Yellow"
},
"monocle_border": {
"description": "Monocle window border colour",
"anyOf": [
{
"$ref": "#/$defs/CatppuccinValue"
},
{
"type": "null"
}
],
"default": "Pink"
},
"name": {
"description": "Name of the Catppuccin theme (previews: https://github.com/catppuccin/catppuccin)",
"$ref": "#/$defs/Catppuccin"
},
"single_border": {
"description": "Single window border colour",
"anyOf": [
{
"$ref": "#/$defs/CatppuccinValue"
},
{
"type": "null"
}
],
"default": "Blue"
},
"stack_border": {
"description": "Stack window border colour",
"anyOf": [
{
"$ref": "#/$defs/CatppuccinValue"
},
{
"type": "null"
}
],
"default": "Green"
},
"stackbar_background": {
"description": "Stackbar background colour",
"anyOf": [
{
"$ref": "#/$defs/CatppuccinValue"
},
{
"type": "null"
}
],
"default": "Base"
},
"stackbar_focused_text": {
"description": "Stackbar focused text colour",
"anyOf": [
{
"$ref": "#/$defs/CatppuccinValue"
},
{
"type": "null"
}
],
"default": "Green"
},
"stackbar_unfocused_text": {
"description": "Stackbar unfocused text colour",
"anyOf": [
{
"$ref": "#/$defs/CatppuccinValue"
},
{
"type": "null"
}
],
"default": "Text"
},
"unfocused_border": {
"description": "Unfocused window border colour",
"anyOf": [
{
"$ref": "#/$defs/CatppuccinValue"
},
{
"type": "null"
}
],
"default": "Base"
},
"unfocused_locked_border": {
"description": "Unfocused locked window border colour",
"anyOf": [
{
"$ref": "#/$defs/CatppuccinValue"
},
{
"type": "null"
}
],
"default": "Red"
}
},
"required": [
"name"
]
},
"KomorebiThemeCustom": {
"description": "Custom Base16 theme",
"type": "object",
"properties": {
"bar_accent": {
"description": "Bar accent colour",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base0D"
},
"colours": {
"description": "Colours of the custom Base16 theme palette",
"$ref": "#/$defs/Base16ColourPalette"
},
"floating_border": {
"description": "Floating window border colour",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base09"
},
"monocle_border": {
"description": "Monocle window border colour",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base0F"
},
"single_border": {
"description": "Single window border colour",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base0D"
},
"stack_border": {
"description": "Stack window border colour",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base0B"
},
"stackbar_background": {
"description": "Stackbar background colour",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base01"
},
"stackbar_focused_text": {
"description": "Stackbar focused text colour",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base0B"
},
"stackbar_unfocused_text": {
"description": "Stackbar unfocused text colour",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base05"
},
"unfocused_border": {
"description": "Unfocused window border colour",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base01"
},
"unfocused_locked_border": {
"description": "Unfocused locked window border colour",
"anyOf": [
{
"$ref": "#/$defs/Base16Value"
},
{
"type": "null"
}
],
"default": "Base08"
}
},
"required": [
"colours"
]
},
"LayoutOptions": {
"description": "Options for specific layouts",
"type": "object",