Skip to content

feat(widgets/bluetooth): Add option to hide widget when adapter is off - #4170

Open
BBaoVanC wants to merge 1 commit into
noctalia-dev:mainfrom
BBaoVanC:bluetooth-hide-when-off
Open

feat(widgets/bluetooth): Add option to hide widget when adapter is off#4170
BBaoVanC wants to merge 1 commit into
noctalia-dev:mainfrom
BBaoVanC:bluetooth-hide-when-off

Conversation

@BBaoVanC

Copy link
Copy Markdown

Summary

This adds a new hide_when_adapter_off option to the Bluetooth widget, which hides the Bluetooth widget when the adapter is powered off.

Motivation

I almost always have Bluetooth disabled, so the bluetooth widget is usually just dead space on my bar. The existing hide_when_no_connected_device option is good, but I also want to see the widget if the bluetooth adapter was left powered on, whether or not any device is connected. This helps me remember to disable it when not used anymore, saving on battery.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Build / packaging

Testing

I added to my config:

[widget.bluetooth]
hide_when_adapter_off = true

Then test by going to control center and toggling bluetooth on and off: I can observe that the bluetooth widget disappears when off, and reappears when turned back on.

Manual Coverage

  • Tested on Niri
  • Tested on Hyprland
  • Tested on Sway
  • Tested on another compositor:
  • Tested with different bar positions and density settings
  • Tested at different interface scaling values
  • Tested with multiple monitors

Screenshots / Videos

image image

Checklist

  • This PR is ready for review, or it is marked as Draft.
  • I read and followed the relevant guidance in CONTRIBUTING.md.
  • I ran just format with clang-format v22+ installed, or this PR has no code changes.
  • I ran the relevant build or test commands, or explained why they were not run.
  • I self-reviewed the changes.
  • I checked for new warnings or errors.
  • I updated user-facing documentation in docs/user/ when this PR changes documented behavior or configuration, or this PR does not require documentation changes.
  • I added or updated assets/translations/en.json, or this PR adds no new user-facing strings.
  • I did not edit non-English translation files unless this PR is explicitly for translation tooling, an import/export sync, or a maintainer-requested locale change.
  • I used the existing canonical names for config keys, IPC names, paths, and identifiers.

This adds a new `hide_when_adapter_off` option to the Bluetooth widget,
which hides the Bluetooth widget when the adapter is powered off.
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.

1 participant