feat: multi-percentage monitors (per-core CPU), max 8

This commit is contained in:
Pi Agent
2026-09-02 16:13:36 +00:00
parent 4f98490224
commit 887d45a771
9 changed files with 112 additions and 41 deletions
+3
View File
@@ -47,6 +47,9 @@ func loadConfig(path string) (*Config, error) {
if it.Refresh <= 0 {
return nil, fmt.Errorf("monitor %q: refresh must be > 0", it.Name)
}
if it.Percentages < 0 || it.Percentages > 8 {
return nil, fmt.Errorf("monitor %q: percentages must be 1..8", it.Name)
}
}
for _, it := range cfg.Exec {
if len(it.ArgTypes) != it.Args {