When switching to a node that has a missing property, yambar didn't
reset its internal state to the default value, causing outdated
information to be displayed.
- Ported d-bus specific code from 'libdbus' to 'sd-bus'
- 'sd_bus' has been added to mesons dependencies. If systemd (>=221) is
not installed, we fall back to [basu](https://git.sr.ht/~emersion/basu)
v2.1
- Fixed a memory leak upon metadata change
This module now supports multiple MPRIS clients and displays the
status fo the most recently active one.
I've also removed any atempts at supporting incomplete/incorrect MPRIS
implementations. The entire update cycle is now completely event
based.
This also means that MPRIS clients must start up after yambar to be
recognized.
- The 'update_status_from_message()' function now properly parses all
changed properties, instead of only the first one.
- Implemented support for the 'Seekd' signal
- Added support for signals and therefore the ability to listen
for updates to the internal state, without having to query it
manually every update cycle
- The entire implementation recieved various changes all across the
codebase.
Wlan interfaces apparently report themselves as ARPHRD_ETHER in their
ifinfomsg struct (despite there being a ARPHRD_IEEE80211 type...).
"Fix" by hardcoding the type to "wlan" when we receive a
NL80211_CMD_NEW_INTERFACE message.
The tag maps to the IFLA_INFO_KIND (part of the IFLA_LINKINFO)
netlink attribute.
This attribute is only available on virtual interfaces. Examples of
valid values are:
* bond
* bridge
* gre
* tun
* veth
This tag maps to the ifinfomsg->ifi_type member, which is set to one
of the ARPHRD_xyz values, defined in linux/if_arp.h.
There's a *ton* of them, and we can't possibly add a string mapping
for _all_ of them, so for now, set to one of:
* loopback
* ether
* wlan
* ARPHRD_NNN, where N is a number
When we're not able to use inotify, we rely on polling. However, we
never detected poll() timeouts, which meant we never re-attempted to
reconnect to MPD.
Maybe #394
This commit adds the ability to display status information for MPRIS
compatible music players.
I've adapted most of the naming conventions (and some code) from the
MPD module.
sway moves the workspace to fallback_output when there is no output. For example: when all the screens are off. This commit adds an ignore for the fallback output.
If the amount of data coming in is more than we can hold in our
buffer, we resized the buffer by doubling its size. However, there
were two(!) issues here:
* If this was the first resize, the buffer size was set to 1024. This
may not be enough (i.e. there may be more than 1024 bytes to process).
* In all other cases, the buffer size was doubled. However, there is
still no guarantee the buffer is large enough.
Fix by looping until the buffer *is* large enough.
We may receive udev notifications for the power-supply subsystem, that
aren’t for us.
Before this patch, this would result in a new poll() call, with
timeout being set to m->poll_interval again. That is, the poll timeout
was being reset.
In theory, this means we could end up in a situation where the battery
status is never updated.
This patch fixes it by tracking how much time is left of the poll
interval. The interval is reset either when the timeout has occurred,
or when we receive an udev notification that _is_ for us.
Hopefully closes#305
The kernel also provides time_to_full, also in seconds, so let's use
that too. Both time_to_empty and time_to_full have 0 as their default
value, hence only consider them for the estimate if they are
positive (instead of non-negative).
Signed-off-by: David Bimmler <git@d4ve.email>
The kernel docs state that time_to_empty contains the estimation of
remaining time in seconds. Hence, calculate estimate minutes and hours
from that in a more correct way.
Signed-off-by: David Bimmler <git@d4ve.email>