rxyhn / yoru

夜 - Yoru | Aesthetic and Beautiful Awesome Environment :first_quarter_moon:
GNU General Public License v3.0
3.46k stars 196 forks source link

Fix battery percentage error causing crash #142

Open jongarbe opened 1 year ago

jongarbe commented 1 year ago

Changing the battery device_path from BAT0 to BAT1 now solves null value on /config/awesome/modules/UPower/init.lua, that caused the entire setup to crash.

xrhstosmour commented 1 year ago

When using the above configuration inside a VM, the setup fails again. On the other hand using use_display_device = true instead of device_path = "/org/freedesktop/UPower/devices/battery_BAT0" at the .config/awesome/signal/baterry.lua file, does not crash the entire setup. The widget shows 0% all the time, but I am not sure how is the behavior on a device with a battery present.

jongarbe commented 1 year ago

@xrhstosmour I hadn't tested VMs before but what you mentioned is true and works, I guess my fix only works when the battery is present. Thanks for your comment.

xrhstosmour commented 1 year ago

@jgarciaehu No need to thank me, happy to help!