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

feat: extend bluetooth module #1540

Merged
merged 7 commits into from
May 11, 2022
Merged

Conversation

daangoossens22
Copy link
Contributor

@daangoossens22 daangoossens22 commented May 2, 2022

Resolves #688
Goal is to show selected bluetooth adapter and its connections. Still a work in progress.

TODO:

  • adapter information
    • use config field with name to select an adapter or select one randomly if config field not defined (adapter-alias)
    • add format replacements for label and tooltip
    • add new styling classes
  • connected devices
    • add format replacement for label for 1 connected device
      • select either the last connected device for this or from a predefined config option to rank which connected device to display (format-device-preference)
    • make possible to show information of all connected devices in the tooltip
    • experimental bluez battery percentage
      • add format replacement for connected device battery percentage (if available)
      • show as experimental feature in waybar-bluetooth man page
  • update the module only when signaled from the bluez D-Bus bus or when the rfkill state has changed (if enabled).
  • update doc when all features finished
  • fix style so it matches the project style

I also noticed that there is no entry for the bluetooth module in the wiki. So that should also maybe be added.

Possible future improvements not part of this merge request:

  • show icon field of the connected bluetooth device when available using a config defined icon theme/size
  • have format-icons for the connected device battery percentage
  • change the selected connected device that appears in the main label changeable via scrolling or clicking?? Don't know how that would interact with the current format-device-preferences or show the latest connection model.
  • also enumerate disconnected devices in the tooltip (e.g. by adding a tooltip-format-enumerate-paired option)

@ErikReider
Copy link
Contributor

Oh cool! I was just about to do this! :)

@daangoossens22 daangoossens22 marked this pull request as ready for review May 6, 2022 15:03
@daangoossens22
Copy link
Contributor Author

daangoossens22 commented May 6, 2022

I think its ready to be reviewed.

This is my first time using meson, so hopefully I didn't make any beginner mistakes there.

Also for the battery percentage feature, I just put it in a seperate experimental section in the waybar-bluetooth man page, since wrapping that code in an experimental build flag would make the code more complicated in my opinion. The code should work in all cases (whether bleuz experimental features are turned on or off and whether a device provides its battery percentage or not). But if it should be wrapped with an experimental build flag, let me know.

@daangoossens22
Copy link
Contributor Author

Forgot to hide the module when its empty from the linked feature request, so I quickly added it.

@Alexays
Copy link
Owner

Alexays commented May 11, 2022

LGTM, thx!

@Alexays Alexays merged commit 3d023a0 into Alexays:master May 11, 2022
@daangoossens22 daangoossens22 deleted the bluetooth branch May 11, 2022 11:05
@Chiheisen Chiheisen mentioned this pull request May 24, 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.

Feature request: more complete bluetooth module
3 participants