'-' is a valid character for tags.
Commit 03e1c7d (module/network: Add link stats, 2022-04-30) introduced
two new tags for the network module: `ul-speed` and `dl-speed`. These
use the `-` character, that was previously never used in any tag.
We had two options: either change those tags to use `_` instead, or just
accept `-`s as a valid character. Going forward, I can see many people
deciding to name their tags with `-` instead of `_`, so I believe it is
better to just accept it once and for all.
Note that `-` cannot be used as the first character of a tag (e.g.
`-tag1`) since the `-` has a special meaning in `.yml` files. I don't
believe this will happen often, however, and should be easy to both
detect and correct if it does.
For channels that have a defined dB range, use that instead of the raw
volume range when calculating the volume percent.
Also use the same logic as alsamixer when calculating the percent from
the dB values: assume a linear scale if the dB range is “small
enough”, and otherwise normalize it against a logarithmic scale.
With this, yambar’s “percent” value matches alsamixer’s exactly.
The ‘volume’ tag remains unchanged - it always reflects the raw volume
values.
Instead, we add a new tag ‘dB’, that reflects the dB values.
Closes#202
Exports two new tags from network module, `ul-speed` and `dl-speed`.
Because these work through polling, poll-interval must be set.
Otherwise, these two tags always will be 0.
Seat status v3 adds a new ‘mode’ event, that informs us of the current
mode (as set by e.g. ‘riverctl enter-mode passthrough’)
The mode is exposed as a tag (named “mode”) on river’s “title”
particle:
- river:
title:
map:
default: {empty: {}}
conditions:
mode == passthrough:
string: {text: " {mode} ", deco: {background: {color: ff0000ff}}}
A condition is formed by:
<tag> <op> <value>
<tag> is the normal yambar tag. <op> is one of '==', '!=', '<', '<=', '>', or
'>='. <value> is what you wish to compare it to.
'boolean' tags must be used directly. They falsehood is matched with '~':
<tag>
~<tag>
Finally, to match an empty string, one must use ' "" ':
<tag> <op> ""
This patch adds an inheritable option, “font-shaping”, that controls
whether a particle that renders text should enable font-shaping or
not.
The option works similar to the ‘font’ option: one can set it at the
top-level, and it gets inherited down through all modules and to their
particles.
Or, you can set it on a module and it gets inherited to all its
particles, but not to other modules’ particles.
Finally, you can set it on individual particles, in which case it only
applies to them (or “child” particles).
When font-shaping is enabled (the default), the string particle shapes
full text runs using the fcft_rasterize_text_run_utf32() API. In fcft,
this results in HarfBuzz being used to shape the string.
When disabled, the string particle instead uses the simpler
fcft_rasterize_char_utf32() API, which rasterizes individual
characters.
This gives user greater control over the font rendering. One example
is bitmap fonts, which HarfBuzz often doesn’t get right.
Closes#159
On i3, users are currently greeted with:
err: modules/i3.c:94: workspace reply/event without 'name' and/or
'output', and/or 'focus' properties
This patch makes ‘focus’ an optional attribute. When missing, we
assume a node-count of 0, which means the workspace’s ‘empty’ tag will
always be true. Document this in the i3 man page.
This is a boolean option. When set, “N:” prefixes will be stripped
from the workspaces’ name tag, *after* having been sorted (if the
‘sort’ option is being used).
This makes it useful to arrange the workspaces in a fixed order, by
prefixing the names with a number in the Sway config:
set $ws1 “1:xyz”
set $ws2 “2:abc”
Then, in the yambar config:
i3:
sort: ascending
strip-workspace-numbers: true
Fonts in the configuration may now be a comma separated list of
fonts (all using the fontconfig format). The first font is the primary
font, and the rest are fallback fonts that will be searched, in order.
This adds a new ‘poll-interval’ option to the network module. When set
to a non-zero value, the following Wi-Fi stats will be updated:
* Signal strength
* RX+TX bitrate
* Bind the foreign-toplevel-manager object *after* the first round of
global objects. This ensures we bind all pre-existing wl-output
objects before binding the toplevel manager. This is important, since
otherwise we wont get any output_enter() events for the initial set of
toplevels.
* Bind xdg-output-manager, to be able to bind xdg-output objects for
each wl-output.
* Add xdg-output-listener to each wl/xdg-output, to be able to get the
outputs’ names.
* Add a list of outputs to each toplevel. The output_enter() event
adds to this list, and output_leave() removes from it.
* Add option ‘all-monitors’. When not set (the default), toplevels are
only included in the generated content if they are mapped on the same
output as the bar itself. When *not* set, all toplevels are always
included in the generated content.