yambar/doc
Daniel Eklöf b195bc4dcb
module/cpu: make ‘content’ particle a template
Before this patch, the cpu module instantiated a single particle (the
‘content’ particle), with one tag ("cpu") representing the total CPU
usage, and then one tag (cpuN) for each core.

This makes it cumbersome to configure, since you need to explicitly
reference each cpuN tag to get per-core usage.

This patch rewrites this, so that ‘content’ is now a template. It’s
instantiated once to represent the total CPU usage, and then once for
each core.

Each instance has a "cpu" tag, representing the CPU usage of that
core (or total usage). It also has an "id" tag. The ID is 0..n for
actual cores, and -1 for total usage.

This means you can do something like this in your config:

- cpu:
    content:
      map:
        conditions:
          id < 0: {string: {text: "Total: {cpu}%"}}
          id >= 0: {string: {text: "Core #{id}: {cpu}%"}}

Closes #207
2022-12-14 12:06:00 +01:00
..
meson.build doc: meson: only install man pages for modules we actually build 2022-12-14 10:29:08 +01:00
yambar-decorations.5.scd overline: new decoration 2022-02-10 20:49:09 +01:00
yambar-modules-alsa.5.scd module/alsa: use channel’s dB range instead of raw volume, if available 2022-06-21 19:49:06 +02:00
yambar-modules-backlight.5.scd doc: add empty line a the end of files 2021-02-23 16:25:29 +01:00
yambar-modules-battery.5.scd doc: battery: some batteries enter "unknown" under normal operation 2021-10-31 21:07:09 +01:00
yambar-modules-clock.5.scd clock: add a config option to show UTC time 2021-09-12 11:19:53 -07:00
yambar-modules-cpu.5.scd module/cpu: make ‘content’ particle a template 2022-12-14 12:06:00 +01:00
yambar-modules-disk-io.5.scd modules: creates disk-io-module 2022-06-17 12:04:13 -03:00
yambar-modules-dwl.5.scd modules/dwl: new module 2022-12-13 15:56:16 +01:00
yambar-modules-foreign-toplevel.5.scd Updated docs to comply with new map syntax 2022-04-23 17:13:24 -03:00
yambar-modules-i3.5.scd Updated docs to comply with new map syntax 2022-04-23 17:13:24 -03:00
yambar-modules-label.5.scd doc: add empty line a the end of files 2021-02-23 16:25:29 +01:00
yambar-modules-mem.5.scd modules: add mem module 2021-12-21 18:44:14 +01:00
yambar-modules-mpd.5.scd module/mpd: add “file” tag 2022-09-03 12:12:11 +02:00
yambar-modules-network.5.scd module/network: Add link stats 2022-06-06 15:11:24 +02:00
yambar-modules-pipewire.5.scd modules/pipewire: new module 2022-12-13 10:16:58 +01:00
yambar-modules-pulse.5.scd modules: add pulse 2022-12-12 18:51:28 +01:00
yambar-modules-removables.5.scd Updated docs to comply with new map syntax 2022-04-23 17:13:24 -03:00
yambar-modules-river.5.scd module/river: add support for the ‘mode’ event 2022-06-02 17:24:42 +02:00
yambar-modules-script.5.scd Updated docs to comply with new map syntax 2022-04-23 17:13:24 -03:00
yambar-modules-sway-xkb.5.scd doc: add empty line a the end of files 2021-02-23 16:25:29 +01:00
yambar-modules-sway.5.scd doc: add empty line a the end of files 2021-02-23 16:25:29 +01:00
yambar-modules-xkb.5.scd doc: add empty line a the end of files 2021-02-23 16:25:29 +01:00
yambar-modules-xwindow.5.scd doc: add empty line a the end of files 2021-02-23 16:25:29 +01:00
yambar-modules.5.scd modules: add pulse 2022-12-12 18:51:28 +01:00
yambar-particles.5.scd Implement '&&' and '||' operators on map 2022-12-10 22:53:30 -03:00
yambar-tags.5.scd float tag: let user specify number of decimals 2022-12-09 15:24:59 +01:00
yambar.1.scd main: add -d,--log-level=info|warning|error|none 2021-08-15 11:43:49 +02:00
yambar.5.scd config: add inheritable option “font-shaping” 2022-02-23 18:43:13 +01:00