Bug 499857 - Option to display number of connected devices on the Bluetooth icon
Summary: Option to display number of connected devices on the Bluetooth icon
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: System Tray widget (show other bugs)
Version: 6.2.5
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-12 06:34 UTC by SC
Modified: 2025-04-15 19:40 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.4.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description SC 2025-02-12 06:34:12 UTC
I almost always have a Bluetooth keyboard connected, but only sometimes connect my Bluetooth headset. The current icon only shows whether there is any device connected, but does not distinguish between 1 2 or 3 etc, so it doesn't really help me.

It would be nice if there can be a number showing the number of currently connected devices on the Bluetooth icon, similar to the battery percentage on the power icon.
Comment 1 John 2025-02-12 07:51:18 UTC
That would be nice to have!
Comment 2 Nate Graham 2025-03-03 22:39:48 UTC
Seems sane to me.

At the moment the Bluetooth Widget uses the default CompactRepresentation for its panel icon. To implement this, we would have to do one of the following:
1. Abandon the use of the default CompactRepresentation and create a custom one that duplicates all its functionality, but with the badge
2. Add generic badge functionality to the default CompactRepresentation and then make use of it here.

#2 is preferable, and a part of https://invent.kde.org/plasma/plasma-workspace/-/issues/85. I'll see what I can do with it.
Comment 3 Bug Janitor Service 2025-03-03 22:43:47 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libplasma/-/merge_requests/1280
Comment 4 Bug Janitor Service 2025-03-03 22:52:28 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2863
Comment 5 Bug Janitor Service 2025-03-03 22:55:16 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/bluedevil/-/merge_requests/199
Comment 6 Nate Graham 2025-04-13 23:33:53 UTC
Git commit 77c05d5e3d2e4e5cbdf0f2f167a0adc541403248 by Nate Graham.
Committed on 08/04/2025 at 19:16.
Pushed by ngraham into branch 'master'.

Build plumbing to support optional badges on default CompactRep

Part of https://invent.kde.org/plasma/plasma-workspace/-/issues/85.

This lets applets request that the default CompactRepresentation show a
badge with the specified text in the bottom-right corner. This
functionality is used by several applets, and we'll be able to port some
to the default CompactRepresentation afterwards.

M  +15   -0    src/plasmaquick/appletquickitem.cpp
M  +15   -0    src/plasmaquick/appletquickitem.h
M  +2    -0    src/plasmaquick/appletquickitem_p.h

https://invent.kde.org/plasma/libplasma/-/commit/77c05d5e3d2e4e5cbdf0f2f167a0adc541403248
Comment 7 Nate Graham 2025-04-15 19:40:24 UTC
Git commit 71af627d8be67553e7fd6f7db75a811a99be0d86 by Nate Graham.
Committed on 15/04/2025 at 19:25.
Pushed by ngraham into branch 'master'.

DefaultCompactRepresentation: add optional badge overlay

Part of https://invent.kde.org/plasma/plasma-workspace/-/issues/85.

Implements the feature in DefaultCompactRepresentation. Requires
plumbing introduced in https://invent.kde.org/plasma/libplasma/-/merge_requests/1280

Applets need to opt into this by setting `badgeText` to a non-empty
string.

M  +27   -0    desktoppackage/contents/applet/DefaultCompactRepresentation.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/71af627d8be67553e7fd6f7db75a811a99be0d86
Comment 8 Nate Graham 2025-04-15 19:40:44 UTC
Git commit 3d9fb7753424ae0624934eaacc337addf443ce95 by Nate Graham.
Committed on 15/04/2025 at 19:40.
Pushed by ngraham into branch 'master'.

applet: add optional badge overlay with number of connected devices

It's configurable, and even when turned on, only appears when there's
more than zero.

Requires:
- https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2863
- https://invent.kde.org/plasma/libplasma/-/merge_requests/1280
FIXED-IN: 6.4.0

A  +16   -0    src/applet/package/contents/config/main.xml
M  +21   -8    src/applet/package/contents/ui/main.qml

https://invent.kde.org/plasma/bluedevil/-/commit/3d9fb7753424ae0624934eaacc337addf443ce95