yambar-tags(5)

๐Ÿฆ‹ yambar-tags(5) ๐Ÿฆ‹

Okay bestie, this is the yambar-tags(5) page from the File Formats Manual, and itโ€™s literally the tea on how tags work in yambar. ๐Ÿ’–

๐ŸŒธ NAME ๐ŸŒธ

yambar-tags - configuration file

โœจ DESCRIPTION โœจ

Tags are the data carriers; it is through tags that modules expose their information. Each module defines its own set of tags.

The available tag types are:

  • string โ€” Value is a string. Rendered as-is by the string particle. โœจ
  • int โ€” Value is an integer. Rendered in base 10 by the string particle. ๐Ÿ”ข
  • bool โ€” Value is true or false. Rendered as "true" or "false" by the string particle. โœ…
  • float โ€” Value is a float. Rendered in base 10, with two decimal digits by the string particle. ๐ŸŒˆ
  • range โ€” Value is an integer, with a minimum and maximum value associated with it. By default, the string particle renders the value. The :min or :max suffixes may be added to instead render the minimum or maximum value ("{tag_name:min}"). ๐ŸŽฏ
  • realtime โ€” Value is an integer that changes in a predictable manner (in "realtime"). This allows the particle to update itself periodically. Only supported by the yambar-particle-progress-bar(5). Other particles can still render the tagโ€™s value. And, the string particle recognizes the :unit suffix, which will be translated to a "s" for a tag with "seconds" resolution, or "ms" for one with "milliseconds" resolution. โฑ๏ธ

๐Ÿ’… FORMATTING ๐Ÿ’…

A tag may be followed by one or more formatters that alter the tagโ€™s rendition.

Formatters are added by appending a : separated list of formatter names:

"{tag_name:max:hex}"

In the formatter breakdown below, kind describes the type of action performed by the formatter:

  • format: changes the representation of the tagโ€™s value
  • selector: changes what to render

In general, formatters of the same kind cannot be combined; if multiple formatters of the same kind are specified, the last one will be used. Periodt. ๐Ÿ’…

๐ŸŽ€ Formatter vibes ๐ŸŽ€

  • [0]<number>[.] โ€” Kind: format. Applies to: Numeric tags (integer and floats). The width reserved to the field. The leading 0 is optional and indicates zero padding, as opposed to space padding. The trailing . is also optional. โœจ
  • .<number> โ€” Kind: format. Applies to: Float tags. How many decimals to print.
  • [0]<N>[.]<M> โ€” Kind: format. Applies to: N: numeric tags, M: float tags. Combined version of the two previous formatters.
  • hex โ€” Kind: format. Applies to: All tag types. Renders a tagโ€™s value in hex.
  • oct โ€” Kind: format. Applies to: All tag types. Renders a tagโ€™s value in octal.
  • % โ€” Kind: format. Applies to: Range tags. Renders a range tagโ€™s value as a percentage value. ๐Ÿ“Š
  • kb, mb, gb โ€” Kind: format. Applies to: All tag types. Renders a tagโ€™s value (in decimal) divided by 1000, 1000^2 or 1000^3. Note: no unit suffix is appended. ๐Ÿงฎ
  • kib, mib, gib โ€” Kind: format. Applies to: All tag types. Same as kb, mb and gb, but divide by 1024^n instead of 1000^n. ๐Ÿ’พ
  • min โ€” Kind: selector. Applies to: Range tags. Renders a range tagโ€™s minimum value. ๐Ÿ”ฝ
  • max โ€” Kind: selector. Applies to: Range tags. Renders a range tagโ€™s maximum value. ๐Ÿ”ผ
  • unit โ€” Kind: selector. Applies to: Realtime tags. Renders a realtime tagโ€™s unit (e.g. "s", or "ms"). โฒ๏ธ

๐Ÿ”ฅ EXAMPLES ๐Ÿ”ฅ

  • A numeric (float or int) tag with at least 3 digits, zero-padded if necessary:
{tag:03}
  • A float tag with 2 decimals:
{tag:.2}
  • A "byte count" tag in gigabytes:
{tag:gib}GB

๐Ÿ’– Thatโ€™s the whole thing, bestie. Source/version: yambar-tags(5) ยท manual: File Formats Manual ยท date: 2024-04-22 โ€” go make your bar iconic. ๐Ÿซถโœจ

๐Ÿ“ฆ where this page comes from