1yambar-modules-cpu(5)         File Formats Manual        yambar-modules-cpu(5)
2
3
4

NAME

6       cpu - This module provides the CPU usage
7

DESCRIPTION

9       This module reports CPU usage, in percent. The content particle is a
10       template that is instantiated once for each core, and once for the to‐
11       tal CPU usage.
12

TAGS

14       ┌─────┬───────┬────────────────────────────────────────────────────────┐
15Name Type  Description                                            
16       ├─────┼───────┼────────────────────────────────────────────────────────┤
17       │id   │ int   │ Core ID. 0..n represents individual cores, and -1 rep‐ │
18       │     │       │ resents the total usage                                │
19       ├─────┼───────┼────────────────────────────────────────────────────────┤
20       │cpu  │ range │ Current usage of CPU core {id}, in percent             │
21       └─────┴───────┴────────────────────────────────────────────────────────┘
22

CONFIGURATION

24       ┌──────────────┬──────┬─────┬──────────────────────────────────────────┐
25Name          Type Req Description                              
26       ├──────────────┼──────┼─────┼──────────────────────────────────────────┤
27       │poll-interval │ int  │ no  │ Refresh interval of the CPU usage stats  │
28       │              │      │     │ in milliseconds (default=500). Cannot be │
29       │              │      │     │ less then 250ms.                         │
30       └──────────────┴──────┴─────┴──────────────────────────────────────────┘
31

EXAMPLES

33   Display total CPU usage as a number
34           bar:
35             left:
36               - cpu:
37                   poll-interval: 2500
38                   content:
39                     map:
40                       conditions:
41                         id < 0:
42                           - string: {text: , font: Font Awesome 6 Free:style=solid}
43                           - string: {text: "{cpu}%"}
44
45   Display a vertical bar for each core
46           bar:
47             left:
48               - cpu:
49                   poll-interval: 2500
50                   content:
51                     map:
52                       conditions:
53                         id >= 0:
54                           - ramp:
55                               tag: cpu
56                               items:
57                                 - string: {text: ▁}
58                                 - string: {text: ▂}
59                                 - string: {text: ▃}
60                                 - string: {text: ▄}
61                                 - string: {text: ▅}
62                                 - string: {text: ▆}
63                                 - string: {text: ▇}
64                                 - string: {text: █}
65

SEE ALSO

67       yambar-modules(5), yambar-particles(5), yambar-tags(5), yambar-decora‐
68       tions(5)
69
70
71
72                                  2023-07-22             yambar-modules-cpu(5)
Impressum