ADD schema for theme

This commit is contained in:
Nathan Dwarshuis 2022-07-17 14:39:38 -04:00
parent 6a49b2d2ce
commit b657a60d1b
2 changed files with 135 additions and 0 deletions

View File

@ -30,6 +30,7 @@ modules:
show_table: true
readwrite:
devices: [sda, nvme0n1]
layout:
anchor: [12, 11]
panels:
@ -46,3 +47,44 @@ layout:
- columns:
- {blocks: [pacman, 24, filesystem, 24, power, 19, memory], width: 436}
margins: [20, 10]
theme:
font: Neuropolitical
patterns:
header: 0xefefef
panel:
bg: {color: 0x121212, alpha: 0.7}
text:
active: 0xbfe1ff
inactive: 0xc8c8c8
critical: 0xff8282
border: 0x888888
plot:
grid: 0x666666
outline: 0x777777
data:
border:
gradient:
- {stop: 0, color: 0x003f7c}
- {stop: 1, color: 0x1e90ff}
fill:
gradient_alpha:
- {stop: 0.2, color: 0x003f7c, alpha: 0.5}
- {stop: 1, color: 0x1e90ff, alpha: 1.0}
indicator:
bg:
gradient:
- {stop: 0, color: 0x565656}
- {stop: 0.5, color: 0xbfbfbf}
- {stop: 1, color: 0x565656}
fg:
active:
gradient:
- {stop: 0, color: 0x316BA6}
- {stop: 0.5, color: 0x99CEFF}
- {stop: 1, color: 0x316BA6}
critical:
gradient:
- {stop: 0, color: 0xFF3333}
- {stop: 0.5, color: 0xFFB8B8}
- {stop: 1, color: 0xFF3333}

View File

@ -172,3 +172,96 @@ properties:
pattern:
"^system|graphics|processor|readwrite|\
network|pacman|filesystem|power|memory$"
theme:
required: [font, patterns]
additionalProperties: false
properties:
font:
description: the font to use
type: string
patterns:
required: [header, panel, text, border, plot, indicator]
additionalProperties: false
properties:
header: &pattern
oneOf:
- type: integer
- type: object
oneOf:
- required: [color, alpha]
- required: [gradient]
- required: [gradient_alpha]
properties:
color:
type: integer
alpha:
anyOf:
- type: "null"
- &alpha {type: number, minimum: 0, maximum: 1}
gradient:
type: array
minItems: 2
items:
type: object
required: [stop, color]
additionalProperties: false
properties: &gradient
stop:
type: number
minimum: 0
maximum: 1
color:
type: integer
gradient_alpha:
type: array
minItems: 2
items:
type: object
required: [stop, color, alpha]
additionalProperties: false
properties:
<<: *gradient
alpha: *alpha
panel:
required: [bg]
additionalProperties: false
properties:
bg: *pattern
text:
required: [active, inactive, critical]
additionalProperties: false
properties:
active: *pattern
inactive: *pattern
critical: *pattern
border: *pattern
plot:
required: [grid, outline, data]
additionalProperties: false
properties:
grid: *pattern
outline: *pattern
data:
required: [border, fill]
additionalProperties: false
properties:
border: *pattern
fill: *pattern
indicator:
required: [bg, fg]
additionalProperties: false
properties:
bg: *pattern
fg:
required: [active, critical]
additionalProperties: false
properties:
active: *pattern
critical: *pattern