Add ‘persistent’, a list-of-strings specifying workspace names that
should be persistent. That is, workspaces that should never be
removed, even if empty.
Note that the workspaces _are_ still destroyed (in i3/Sway), but
yambar keeps abstractions for them around. This is useful to e.g. keep
a strict order between your “core” workspaces.
Closes#72
First, apply max-len to the converted wide character string, instead
of the UTF-8 string. This is better, and more correct, since UTF-8 is
multibyte, and applying max-len to that results in strings _shorter_
than max-len.
Second, use HORIZONTAL ELLIPSIS (…) instead of three regular
periods (...) as truncation character. This “saves” 2 characters.
To be able to do this, the conversion to a wide character, and glyph
rasterization is now done when the exposable is instantiated, instead
of in begin_expose().
Closes#73
When set to a non-negative value, the script module will call the
configured script every <poll-interval> second.
In this mode, the script is expected to write one tag set and then
exit.
This is intended to simplify the implementation of scripts that would
otherwise just do a loop + sleep.
Closes#67
This is an integer that specifies the amount of scrolling that needs
to be accumulated before a wheel-up/down event is emitted.
A higher value means you need to drag your fingers a longer distance
before the event is emitted.
The default is 30.
One can now bind the left/middle/right mouse buttons to on-click. In
fact, you can have all three buttons bound to different handlers for
the same particle. The new syntax is
on-click:
left: <command>
middle: <command>
right: <command>
Leaving one out is the same thing as not mapping it at
all. Furthermore,
on-click: <command>
is still valid, and is a shorthand for
on-click:
left: <commsnd>
Some batteries support charge thresholds and when the upper limit is set to a number less than 100 percent and it reaches that limit and it is connected to the charger the battery state will be "Not charging".
It doesn't charge anymore despite it's not full.
Some battery drivers will remove their sysfs directory when the
battery goes from charging to discharging, or vice verse.
This caused yambar’s battery module to terminate, resulting in the
last known battery state to “freeze”.
With this patch, failure to read the battery directory the *first*
time is still considered a hard failure, resulting in an error message
and then termination.
However, subsequent failures, i.e. while polling the battery state,
is *not* considered fatal; we simply don’t update the bar, and retry
again the next poll interval. Error messages are still logged however.
Closes#44
This is already being done in the initial query response. Not doing it
in the input event handler too leads to an assertion if there are
multiple devices with the same ID.
Hopefully fixes#54
a5bbf0b769 introduced text-run
shaping.
Do avoid having to re-shape non-changing strings every time the bar is
refreshed, the *particle* (i.e. not the exposable) caches the last
shaped text-run.
Then, in expose(), it then assumes that that cached text-run is
the *same* text-run as returned from begin_expose().
This is true in most cases, but *not* when a single particle is
re-used to instantiate multiple exposables, as is commonly done by
modules generating dynlists. For example, the i3/sway module.
This fixes it, by making the cache growable, and by adding a “lock” to
each cache entry.
The lock is set in begin_expose(), to indicate that this particular
cache entry is needed in expose().
If we can’t find a matching cache entry, we first try to find a free
“slot” by searching for either unused, or used-but-not-locked cache
entries.
If that fails, we grow the cache and add a new entry.
In expose(), we unset the lock.
Closes#47