feat: config file for refresh interval, cycle timing warning, persistent cbreak

- Optional JSON config ($PI_STAT_CONFIG, ~/.config/pi-stat/config.json,
  <script dir>/pi-stat.json) with refresh_interval; -i SEC overrides it
- Refresh deadline anchored to cycle start; warn when a cycle takes
  >= 80% of the refresh interval or exceeds it
- Switch the tty to cbreak once per session so keypresses made during a
  long cycle are not dropped
- Ship pi-stat.json with the repo

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-23 08:05:04 +00:00
parent bb441f16e8
commit 4e27efc3b9
3 changed files with 128 additions and 40 deletions
+4
View File
@@ -0,0 +1,4 @@
{
"_comment": "refresh_interval in Sekunden, min. 1 (Default: 5)",
"refresh_interval": 10
}