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

Upower module #1484

Merged
merged 25 commits into from
Mar 22, 2022
Merged

Upower module #1484

merged 25 commits into from
Mar 22, 2022

Conversation

ErikReider
Copy link
Contributor

@ErikReider ErikReider commented Mar 15, 2022

A module that displays the icon provided by UPower with the percentage next to it.
Example icon: battery-caution-charging-symbolic

The module also connects to the org.freedesktop.login1.Manager DBus interface to update the battery status after waking up from sleep. The module only updates when the UPower DBus interface updates so no polling here! :)

To-do:

  • Fix nasty Error in inter-thread communication: write() failed: Bad file descriptor warning
  • Fix UpDevice getting unrefed
  • Tool-tip with other devices
  • Man pages
  • CSS status
  • Format
  • Format-alt

Anything else to fix?

Screenshots

image
When no main battery is detected while other devices are supported by UPower:

swappy-20220319_192743
On hover:

image
When a battery is detected:

Fixes #975
Port of waybar-battery-module

@Alexays
Copy link
Owner

Alexays commented Mar 22, 2022

LGTM nice work!
Can you also add man to github wiki? ❤️

@Alexays Alexays merged commit d4a0748 into Alexays:master Mar 22, 2022
@ErikReider ErikReider deleted the upower-module branch March 22, 2022 09:01
@ErikReider
Copy link
Contributor Author

Can you also add man to github wiki?

Done! :)

@gnull
Copy link

gnull commented Mar 23, 2022

I have trouble changing colors in upower module.

I have

"upower": {
     "icon-size": 20,
     "hide-if-empty": true,
     "tooltip": true,
     "tooltip-spacing": 20
}

and

#upower {
    background-color: #ffffff;
    color: #000000;
}

in my config and style.css. When I swap the #ffffff and #000000, nothing changes and the module stays displayed white on black.

Does the module support changing colors?

Ivan

@ErikReider
Copy link
Contributor Author

ErikReider commented Mar 25, 2022

@gnull Woops, forgot to set the widget name... I'll submit a PR asap :)

@ErikReider ErikReider mentioned this pull request Mar 25, 2022
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.

Consider adding upower status to battery module
3 participants