/
mpv.tera
26 lines (26 loc) 路 1.11 KB
/
mpv.tera
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
---
whiskers:
version: 2.1.0
matrix:
- variant: ["mpv", "script-opts/stats"]
- flavor
- accent
filename: "themes/{{flavor.identifier}}/{{accent}}/{{variant}}.conf"
---
{%- macro hex_byte(hex, index) -%}{{ hex | split(pat="") | slice(start=(index * 2 - 1), end=(index * 2 + 1)) | join() }}{%- endmacro hex_byte -%}
{%- macro bgr(hex) -%}{{self::hex_byte(hex=hex, index=3)}}{{self::hex_byte(hex=hex, index=2)}}{{self::hex_byte(hex=hex, index=1)}}{%- endmacro bgr -%}
{%- set palette = flavor.colors -%}
{%- if variant == "mpv" -%} {#- Main theme file -#}
background-color='#{{ palette.base.hex }}'
osd-back-color='#{{ palette.overlay0.hex }}'
osd-border-color='#{{ palette.crust.hex }}'
osd-color='#{{ palette.text.hex }}'
osd-shadow-color='#{{ palette.base.hex }}'
{%- else -%} {#- Stats script file -#}
# Colors are in #BBGGRR format
border_color={{ self::bgr(hex=palette.mantle.hex) }}
font_color={{ self::bgr(hex=palette.text.hex) }}
plot_bg_border_color={{ self::bgr(hex=palette[accent].hex) }}
plot_bg_color={{ self::bgr(hex=palette.mantle.hex) }}
plot_color={{ self::bgr(hex=palette[accent].hex) }}
{%- endif -%}