Merge pull request #5054 from IVSOP/feat/cpu-icons-auto

feat(cpu): add {icons} format replacement for all per-core icons
This commit is contained in:
Alexis Rouillard
2026-07-03 23:11:19 +02:00
committed by GitHub
3 changed files with 22 additions and 2 deletions
+12
View File
@@ -112,6 +112,8 @@ The *cpu* module displays the current CPU utilization.
*{icon*{n}*}*: Icon for CPU core n usage. Use like {icon0}.
*{icon0}{icon1}{icon2}{icon3}*: All per-core icons concatenated. Equivalent to {icon0}{icon1}...{icon*N*} but adapts to the number of cores automatically.
# EXAMPLES
Basic configuration:
@@ -134,6 +136,16 @@ CPU usage per core rendered as icons:
},
```
Automatically determine number of icons according to number of logical cores:
```
"cpu": {
"interval": 1,
"format": "{icons} {usage:>2}% ",
"format-icons": ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"],
},
```
# STYLE
- *#cpu*