Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: CI
on:
pull_request:
branches:
- main

jobs:
lint:
name: Lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- run: pip3 install jsonschema-cli
- run: |
for directory in base16 holiday standard warp_bundled; do
env -C "$directory" jsonschema-cli validate "../schemas/theme.json" *.yaml
done
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"yaml.schemas": {
"schemas/theme.json": [
"base16/*.yaml",
"holiday/*.yaml",
"standard/*.yaml",
"warp_bundled/*.yaml"
]
}
}
179 changes: 179 additions & 0 deletions schemas/theme.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"definitions": {
"color": {
"type": "string",
"pattern": "^#[0-9a-fA-F]{6}$",
"examples": [
"#000000",
"#ff0000",
"#00ff00",
"#0000ff",
"#ffff00",
"#ff00ff",
"#00ffff",
"#ffffff"
]
},
"colors": {
"type": "object",
"properties": {
"black": {
"title": "black",
"description": "A black color of the current theme\nhttps://docs.warp.dev/appearance/custom-themes#create-your-own-custom-theme-manually",
"$ref": "#/definitions/color"
},
"blue": {
"title": "blue",
"description": "A blue color of the current theme\nhttps://docs.warp.dev/appearance/custom-themes#create-your-own-custom-theme-manually",
"$ref": "#/definitions/color"
},
"cyan": {
"title": "cyan",
"description": "A cyan color of the current theme\nhttps://docs.warp.dev/appearance/custom-themes#create-your-own-custom-theme-manually",
"$ref": "#/definitions/color"
},
"green": {
"title": "green",
"description": "A green color of the current theme\nhttps://docs.warp.dev/appearance/custom-themes#create-your-own-custom-theme-manually",
"$ref": "#/definitions/color"
},
"magenta": {
"title": "magenta",
"description": "A magenta color of the current theme\nhttps://docs.warp.dev/appearance/custom-themes#create-your-own-custom-theme-manually",
"$ref": "#/definitions/color"
},
"red": {
"title": "red",
"description": "A red color of the current theme\nhttps://docs.warp.dev/appearance/custom-themes#create-your-own-custom-theme-manually",
"$ref": "#/definitions/color"
},
"white": {
"title": "white",
"description": "A white color of the current theme\nhttps://docs.warp.dev/appearance/custom-themes#create-your-own-custom-theme-manually",
"$ref": "#/definitions/color"
},
"yellow": {
"title": "yellow",
"description": "A yellow color of the current theme\nhttps://docs.warp.dev/appearance/custom-themes#create-your-own-custom-theme-manually",
"$ref": "#/definitions/color"
}
},
"additionalProperties": false
},
"color-or-gradient": {
"oneOf": [
{
"$ref": "#/definitions/color"
},
{
"type": "object",
"oneOf": [
{
"properties": {
"left": {
"title": "left",
"description": "A left color of the current theme\nhttps://docs.warp.dev/appearance/custom-themes#background-images-and-gradients",
"$ref": "#/definitions/color"
},
"right": {
"title": "right",
"description": "A right color of the current theme\nhttps://docs.warp.dev/appearance/custom-themes#background-images-and-gradients",
"$ref": "#/definitions/color"
}
},
"additionalProperties": false
},
{
"properties": {
"top": {
"title": "top",
"description": "A top color of the current theme\nhttps://docs.warp.dev/appearance/custom-themes#background-images-and-gradients",
"$ref": "#/definitions/color"
},
"bottom": {
"title": "bottom",
"description": "A bottom color of the current theme\nhttps://docs.warp.dev/appearance/custom-themes#background-images-and-gradients",
"$ref": "#/definitions/color"
}
},
"additionalProperties": false
}
]
}
]
}
},
"title": "theme",
"description": "A theme",
"type": "object",
"properties": {
"accent": {
"title": "accent",
"description": "An accent color of the current theme\nhttps://docs.warp.dev/appearance/custom-themes#create-your-own-custom-theme-manually",
"$ref": "#/definitions/color-or-gradient"
},
"background": {
"title": "background",
"description": "A background color of the current theme\nhttps://docs.warp.dev/appearance/custom-themes#create-your-own-custom-theme-manually",
"$ref": "#/definitions/color-or-gradient"
},
"details": {
"title": "details",
"description": "Whether lighter or darker colors are used in the current theme\nhttps://docs.warp.dev/appearance/custom-themes#create-your-own-custom-theme-manually",
"type": "string",
"enum": [
"lighter",
"darker"
]
},
"foreground": {
"title": "foreground",
"description": "A foreground color of the current theme\nhttps://docs.warp.dev/appearance/custom-themes#create-your-own-custom-theme-manually",
"$ref": "#/definitions/color"
},
"terminal_colors": {
"title": "terminal colors",
"description": "Terminal colors of the current theme\nhttps://docs.warp.dev/appearance/custom-themes#create-your-own-custom-theme-manually",
"type": "object",
"properties": {
"bright": {
"title": "bright",
"description": "Bright colors of the current theme\nhttps://docs.warp.dev/appearance/custom-themes#create-your-own-custom-theme-manually",
"$ref": "#/definitions/colors"
},
"normal": {
"title": "normal",
"description": "Normal colors of the current theme\nhttps://docs.warp.dev/appearance/custom-themes#create-your-own-custom-theme-manually",
"$ref": "#/definitions/colors"
}
},
"additionalProperties": false
},
"background_image": {
"title": "background image",
"description": "A background image of the current theme",
"type": "object",
"properties": {
"path": {
"title": "path",
"description": "A path of the current image of the current theme\nhttps://docs.warp.dev/appearance/custom-themes#background-images-and-gradients",
"type": "string",
"minLength": 1,
"examples": [
"warp.jpg"
]
},
"opacity": {
"title": "opacity",
"description": "An opacity of the current image of the current theme\nhttps://docs.warp.dev/appearance/custom-themes#background-images-and-gradients",
"type": "integer",
"minimum": 0,
"maximum": 100
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}