From 34da5edfe0ed42180a78441e4999d4b33de0c4aa Mon Sep 17 00:00:00 2001 From: Jake Stanger Date: Tue, 15 Jul 2025 22:45:49 +0100 Subject: [PATCH] docs(sysinfo): add info on querying values Resolves #1090 --- docs/modules/Sys-Info.md | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/docs/modules/Sys-Info.md b/docs/modules/Sys-Info.md index d26364d..18cc1b2 100644 --- a/docs/modules/Sys-Info.md +++ b/docs/modules/Sys-Info.md @@ -194,12 +194,12 @@ The list of available functions is shown below: It is also possible to get only a single value from the set by specifying a name instead of a function. -| Token category | Valid name | -|----------------|-------------------------------------------------------------------------| -| CPU | A CPU thread, eg `cpu0`, `cpu1`, ... | -| Temperature | A sensor name, eg `CPUTIN`. These line up with the output of `sensors`. | -| Disk | A disk mountpoint, eg `/`, `/home`, ... | -| Network | An adapter name, eg `eth0` or `enp30s0`. | +| Token category | Valid name | +|----------------|------------------------------------------| +| CPU | A CPU thread, eg `cpu0`, `cpu1`, ... | +| Temperature | A sensor name, eg `CPUTIN`. | +| Disk | A disk mountpoint, eg `/`, `/home`, ... | +| Network | An adapter name, eg `eth0` or `enp30s0`. | To specify a name or function, use a `@`. For example, to show disk percent for `/home`: @@ -214,6 +214,22 @@ To show total CPU utilization where each core represents 100% (like `htop` etc): "{cpu_percent@sum}%" ``` +> [!TIP] +> Available values can be queried over IPC using the CLI. +> This can be particularly useful for sensors, which tend not to have obvious names. +> +> ```shell +> ironbar var list sysinfo.temp_c +> ``` +> +> Some usual cases to look out for: +> +> - `k10temp` is an AMD CPU internal sensor +> - Motherboard chipsets tend to prefix their sensors accordingly. For example, `CPUTIN`, `nct6687 CPU`, `asusec AMD`. +> - `amdgpu` is as it suggests. +> +> Sensor names are pulled from `hwmon` and should vaguely line up with the output of `sensors` + #### Prefixes and units For tokens which return an appropriate unit, you can specify the SI prefix (or unit in some special cases).