{# ---- Glyphes météo 1-bit (silhouettes pleines, nettes sur e-ink) ---- #} {% macro sun(cx, cy, r) -%} {% for a in [0,45,90,135,180,225,270,315] %} {% endfor %} {%- endmacro %} {% macro cloud(ox, oy, s) -%} {%- endmacro %} {% macro wxicon(kind) -%} {% if kind == 'clear' %}{{ sun(50, 50, 21) }} {% elif kind == 'partly' %}{{ sun(34, 32, 15) }}{{ cloud(18, 36, 0.78) }} {% elif kind == 'cloudy' %}{{ cloud(8, 22, 0.95) }} {% elif kind == 'fog' %}{{ cloud(8, 12, 0.9) }} {% for y in [76, 86, 96] %}{% endfor %} {% elif kind == 'rain' %}{{ cloud(8, 8, 0.92) }} {% for x in [30, 50, 70] %}{% endfor %} {% elif kind == 'snow' %}{{ cloud(8, 8, 0.92) }} {% for x in [30, 50, 70] %}{% endfor %} {% elif kind == 'storm' %}{{ cloud(8, 4, 0.92) }} {% else %}{{ cloud(8, 22, 0.95) }}{% endif %} {%- endmacro %} {# ---- Jauge : la signature ---- #} {% macro gauge(g, mini=False) -%}
{{ g.name }} {{ g.remaining | round | int }}% restant
reset {{ g.resets_in }} · {{ (100 - g.remaining) | round | int }}% conso{% if g.extra %} · {{ g.extra }}{% endif %}
{%- endmacro %}
{% if weather.ok %} {{ wxicon(weather.kind) }}
{{ weather.temp | round | int }}°C
{% else %}
Météo indisponible
{% endif %}
{% if weather.ok %}
{{ weather.label }} · ressenti {{ weather.feels_like | round | int }}° · {{ weather.temp_min | round | int }}° / {{ weather.temp_max | round | int }}°{% if weather.precip_prob is not none %} · pluie {{ weather.precip_prob }}%{% endif %}
{% endif %} {% if nas.ok %}
NAS {% if nas.docker_unhealthy %}{{ nas.docker_unhealthy }} KO{% endif %}
{% for d in nas.disks %}
{{ d.label }}{{ d.percent | round | int }}% · {{ d.free_human }}
{% endfor %}
Docker{{ nas.docker_running }}/{{ nas.docker_total }}{% if not nas.docker_unhealthy %} ✓{% endif %}
VPN{% if nas.vpn_ok %}OK{% if nas.vpn_port %} · {{ nas.vpn_port }}{% endif %}{% else %}DÉSYNC{% endif %}
{% endif %} {% if trackers %}
Trackers
{% for t in trackers %}
{{ t.label }} {% if t.ok %}{{ t.ratio_h }} {% else %}{{ t.error }}{% endif %}
{% if t.ok %}{% if t.up_bytes or t.down_bytes %}
envoyé {{ t.up_h }} · reçu {{ t.down_h }}
{% endif %} {% if t.tokens is not none %}
{{ t.tokens_h }} {{ t.tokens_label }}
{% endif %}{% endif %}
{% endfor %}
{% endif %} {% if ha_states %}
Maison
{% for s in ha_states %}
{{ s.label }}{{ s.display }}
{% endfor %}
{% endif %}
Claude {% if claude.ok %}Max 5×{% endif %}
{% if not claude.ok %}
⚠ {{ claude.error }}
{% else %} {% for g in gauges %}{{ gauge(g) }}{% endfor %} {% if claude.extra or claude.burn_rate %}
{% if claude.extra %}{{ claude.extra.label }}{% endif %}{% if claude.extra and claude.burn_rate %} · {% endif %}{% if claude.burn_rate %}burn {{ claude.burn_rate | round | int }} tok/min{% endif %}
{% endif %} {% endif %} {% if codex.ok %}
Codex {% if codex.plan_type %}{{ codex.plan_type | capitalize }}{% endif %} {% if codex.limited %}Limite{% endif %}
{% for g in codex.gauges %}{{ gauge(g, mini=True) }}{% endfor %} {% endif %}