Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix battery percentage error causing crash #142

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jongarbe
Copy link

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.

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
Copy link

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
Copy link
Author

@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
Copy link

xrhstosmour commented Sep 18, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants