yambar-modules-cpu(5)

yambar-modules-cpu5

This module provides the cpu usage

Overview

This module reports CPU usage, in percent. The content particle is a template that is instantiated once for each core, and once for the total CPU usage.

Tags

NameTypeDescription
idintCore ID. 0..n represents individual cores, and -1 represents the total usage
cpurangeCurrent usage of CPU core {id}, in percent

Configuration

NameTypeReqDescription
poll-intervalintnoRefresh interval of the CPU usage stats in milliseconds (default=500). Cannot be less then 250ms.

Examples

Display total CPU usage as a number

bar:
  left:
    - cpu:
        poll-interval: 2500
        content:
          map:
            conditions:
              id < 0:
                - string: {text: , font: Font Awesome 6 Free:style=solid}
                - string: {text: "{cpu}%"}

Display a vertical bar for each core

bar:
  left:
    - cpu:
        poll-interval: 2500
        content:
          map:
            conditions:
              id >= 0:
                - ramp:
                    tag: cpu
                    items:
                      - string: {text: ▁}
                      - string: {text: ▂}
                      - string: {text: ▃}
                      - string: {text: ▄}
                      - string: {text: ▅}
                      - string: {text: ▆}
                      - string: {text: ▇}
                      - string: {text: █}

Releases

2 releases since Debian 12 (Bookworm); the text changed 1 time.

  1. 12
  2. 13

From yambar 1.11.0-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.