You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched through the existing closed and open issues for eww and made sure this is not a duplicate
I have specifically verified that this bug is not a common user error
I am providing as much relevant information as I am able to in this bug report (Minimal config to reproduce the issue for example, if applicable)
Description of the bug
2024-11-26T12:55:33.867Z WARN eww::config::system_stats > Failed to get/calculate uWh: the total_avg value of the battery magic var will probably be a garbage value that can not be trusted.
The warning appears to be common in many issues, though the issues I am noting these warning in are for different reasons.
/sys/class/power_supply contains:
AC BAT0 hidpp_battery_4
/sys/class/power_supply/BAT0 contains the necessary files to read:
alarm device serial_number
capacity energy_full status
capacity_level energy_full_design subsystem
charge_behaviour energy_now technology
charge_control_end_threshold manufacturer type
charge_control_start_threshold model_name uevent
charge_start_threshold power voltage_min_design
charge_stop_threshold power_now voltage_now
cycle_count present present
/sys/class/power_supply/hidpp_battery_4 contains the necessary files to trigger first if:
capacity manufacturer online powers serial_number subsystem uevent device model_name power scope status type wakeup53
/sys/class/power_supply/AC does not seem to match a scenario for the loop:
device online power subsystem type uevent wakeup46
Is it expected behavior that AC should be returning a warning, or should it be returning "plugged" or some indicator aligned to being plugged in?
I am on Alpine linux, but I have noted this in Eww issues search using Arch and other distros.
Launch eww on a linux distro and check logs.
Expected behaviour
Battery Magic Variable returns a value for AC indicating plugged or unplugged.
I believe that this is dependent on if /sys/class/power_supply/AC/online = 1 or 0, would likely be an easy add.
I believe status indicating charging or not charging also needs to accommodate knowing whether AC is online or not, because in that way you could leverage the magic variable to align with indicating on widget a different icon while plugged very easily.
A solution may be along lines of:
(this is not working code - just pseudo)
Checklist before submitting an issue
Description of the bug
2024-11-26T12:55:33.867Z WARN eww::config::system_stats > Failed to get/calculate uWh: the total_avg value of the battery magic var will probably be a garbage value that can not be trusted.
The warning appears to be common in many issues, though the issues I am noting these warning in are for different reasons.
/sys/class/power_supply
contains:/sys/class/power_supply/BAT0
contains the necessary files to read:alarm device serial_number capacity energy_full status capacity_level energy_full_design subsystem charge_behaviour energy_now technology charge_control_end_threshold manufacturer type charge_control_start_threshold model_name uevent charge_start_threshold power voltage_min_design charge_stop_threshold power_now voltage_now cycle_count present present
/sys/class/power_supply/hidpp_battery_4
contains the necessary files to trigger first if:capacity manufacturer online powers serial_number subsystem uevent device model_name power scope status type wakeup53
/sys/class/power_supply/AC
does not seem to match a scenario for the loop:device online power subsystem type uevent wakeup46
Is it expected behavior that AC should be returning a warning, or should it be returning "plugged" or some indicator aligned to being plugged in?
https://github.com/elkowar/eww/blob/master/crates/eww/src/config/system_stats.rs#L186
Reproducing the issue
I am on Alpine linux, but I have noted this in Eww issues search using Arch and other distros.
Launch eww on a linux distro and check logs.
Expected behaviour
Battery Magic Variable returns a value for AC indicating plugged or unplugged.
I believe that this is dependent on if /sys/class/power_supply/AC/online = 1 or 0, would likely be an easy add.
I believe status indicating charging or not charging also needs to accommodate knowing whether AC is online or not, because in that way you could leverage the magic variable to align with indicating on widget a different icon while plugged very easily.
A solution may be along lines of:
(this is not working code - just pseudo)
Additional context
No response
Platform and environment
Wayland, Alpine Edge, Hyprland 0.45, eww 0.4.0
The text was updated successfully, but these errors were encountered: