The Kurgan 1.0.0: one process for the LCD, fans, lighting, local LLM servers and the web UI

This commit is contained in:
paul committed 2026-12-05 16:20:49 +13:00
commit f631386618
71 files changed
+14616

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
"""Colours and thresholds shared by the LCD, the case/RAM lighting and the tray icon."""
from __future__ import annotations
from dataclasses import dataclass
@dataclass
class Theme:
accent: tuple[int, int, int] = (232, 28, 44)
cpu_temp_range: tuple[float, float] = (20.0, 100.0)
gpu_temp_range: tuple[float, float] = (20.0, 90.0)
psu_watts: float = 1000.0 # fills the power tank
# Optional mirrored direction on the right; by default all gauges fill clockwise.
mirror_gauge_direction: bool = False
titles: tuple[str, str] = ("GPU", "CPU")
# Gauges are green below *_warn, yellow from *_warn to *_hot, red above.
temp_warn: float = 50.0 # deg C
temp_hot: float = 80.0
load_warn: float = 50.0 # percent
load_hot: float = 80.0
cool_color: tuple[int, int, int] = (38, 204, 72)
warm_color: tuple[int, int, int] = (244, 192, 22)
hot_color: tuple[int, int, int] = (232, 28, 44)
# Power tank layers. Kept clear of the gauges' green/yellow/red, and checked to stay
# distinguishable with colour-blindness against the dark glass.
cpu_color: tuple[int, int, int] = (57, 135, 229) # blue
gpu_color: tuple[int, int, int] = (25, 158, 112) # aqua
other_color: tuple[int, int, int] = (217, 89, 38) # copper orange
def level_color(self, value: float, warn: float, hot: float) -> tuple[int, int, int]:
if value < warn:
return self.cool_color
if value <= hot:
return self.warm_color
return self.hot_color