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

NAME

6       yambar-tags - configuration file
7

DESCRIPTION

9       Tags are the data carriers; it is through tags that modules expose
10       their information. Each module defines its own set of tags.
11
12       The available tag types are:
13
14       ┌─────────┬────────────────────────────────────────────────────────────┐
15Type     Description                                                
16       ├─────────┼────────────────────────────────────────────────────────────┤
17       │string   │ Value is a string. Rendered as-is by the string particle.  │
18       ├─────────┼────────────────────────────────────────────────────────────┤
19       │int      │ Value is an integer. Rendered in base 10 by the string
20       │         │ particle.                                                  │
21       ├─────────┼────────────────────────────────────────────────────────────┤
22       │bool     │ Value is true or false. Rendered as "true" or "false" by   │
23       │         │ the string particle                                        │
24       ├─────────┼────────────────────────────────────────────────────────────┤
25       │float    │ Value is a float. Rendered in base 10, with two decimal    │
26       │         │ digits by the string particle                              │
27       ├─────────┼────────────────────────────────────────────────────────────┤
28       │range    │ Value is an integer, with a minimum and maximum value as‐  │
29       │         │ sociated with it. By default, the string particle renders  │
30       │         │ the value. The :min or :max suffixes may be added to in‐   │
31       │         │ stead render the minimum or maximum value                  │
32       │         │ ("{tag_name:min}").                                        │
33       ├─────────┼────────────────────────────────────────────────────────────┤
34       │realtime │ Value is an integer that changes in a predictable manner   │
35       │         │ (in "realtime"). This allows the particle to update itself │
36       │         │ periodically. Only supported by the yambar-particle-       
37       │         │ progress-bar(5). Other particles can still render the      │
38       │         │ tag's value. And, the string particle recognizes the :unit 
39       │         │ suffix, which will be translated to a "s" for a tag with   │
40       │         │ "seconds" resolution, or "ms" for one with "milliseconds"  │
41       │         │ resolution.                                                │
42       └─────────┴────────────────────────────────────────────────────────────┘
43

FORMATTING

45       A tag may be followed by one or more formatters that alter the tags
46       rendition.
47
48       Formatters are added by appending a ':' separated list of formatter
49       names:
50
51           "{tag_name:max:hex}"
52
53       In the table below, "kind" describes the type of action performed by
54       the formatter:
55
56format: changes the representation of the tag's value
57selector: changes what to render
58
59
60       In general, formatters of the same kind cannot be combined; if multiple
61       formatters of the same kind are specified, the last one will be used.
62
63       ┌───────────────┬──────────┬──────────────────┬────────────────────────┐
64Formatter      Kind     Applies to       Description            
65       ├───────────────┼──────────┼──────────────────┼────────────────────────┤
66       │[0]<number>[.] │ format   │ Numeric tags     │ The width reserved to  │
67       │               │          │ (integer and     │ the field. The leading │
68       │               │          │ floats)          │ '0' is optional and    │
69       │               │          │                  │ indicates zero pad‐    │
70       │               │          │                  │ ding, as opposed to    │
71       │               │          │                  │ space padding. The     │
72       │               │          │                  │ trailing '.' is also   │
73       │               │          │                  │ optional               │
74       ├───────────────┼──────────┼──────────────────┼────────────────────────┤
75       │.<number>      │ format   │ Float tags       │ How many decimals to   │
76       │               │          │                  │ print                  │
77       ├───────────────┼──────────┼──────────────────┼────────────────────────┤
78       │[0]<N>[.]<M>   │ format   │ N: numeric tags, │ Combined version of    │
79       │               │          │ M: float tags    │ the two previous for‐  │
80       │               │          │                  │ matters                │
81       ├───────────────┼──────────┼──────────────────┼────────────────────────┤
82       │hex            │ format   │ All tag types    │ Renders a tag's value  │
83       │               │          │                  │ in hex                 │
84       ├───────────────┼──────────┼──────────────────┼────────────────────────┤
85       │oct            │ format   │ All tag types    │ Renders a tag's value  │
86       │               │          │                  │ in octal               │
87       ├───────────────┼──────────┼──────────────────┼────────────────────────┤
88       │%              │ format   │ Range tags       │ Renders a range tag's  │
89       │               │          │                  │ value as a percentage  │
90       │               │          │                  │ value                  │
91       ├───────────────┼──────────┼──────────────────┼────────────────────────┤
92       │kb, mb, gb     │ format   │ All tag types    │ Renders a tag's value  │
93       │               │          │                  │ (in decimal) divided   │
94       │               │          │                  │ by 1000, 1000^2 or     │
95       │               │          │                  │ 1000^3. Note: no unit  │
96       │               │          │                  │ suffix is appended)    │
97       ├───────────────┼──────────┼──────────────────┼────────────────────────┤
98       │kib, mib, gib  │ format   │ All tag types    │ Same as kb, mb and gb, │
99       │               │          │                  │ but divide by 1024^n   │
100       │               │          │                  │ instead of 1000^n.     │
101       ├───────────────┼──────────┼──────────────────┼────────────────────────┤
102       │min            │ selector │ Range tags       │ Renders a range tag's  │
103       │               │          │                  │ minimum value          │
104       ├───────────────┼──────────┼──────────────────┼────────────────────────┤
105       │max            │ selector │ Range tags       │ Renders a range tag's  │
106       │               │          │                  │ maximum value          │
107       ├───────────────┼──────────┼──────────────────┼────────────────────────┤
108       │unit           │ selector │ Realtime tags    │ Renders a realtime     │
109       │               │          │                  │ tag's unit (e.g. "s",  │
110       │               │          │                  │ or "ms")               │
111       └───────────────┴──────────┴──────────────────┴────────────────────────┘
112

EXAMPLES

114       •   A numeric (float or int) tag with at least 3 digits, zero-padded if
115           necessary:
116
117
118           {tag:03}
119
120       •   A float tag with 2 decimals:
121
122
123           {tag:.2}
124
125       •   A "byte count" tag in gigabytes:
126
127
128           {tag:gib}GB
129
130
131
132                                  2023-07-22                    yambar-tags(5)
Impressum