quickshell icon indicating copy to clipboard operation
quickshell copied to clipboard

Bluetooth library 🥺

Open deviantsemicolon opened this issue 11 months ago • 2 comments

The one thing stopping me from using quickshell is that it doesn't have a library for Bluetooth, and I'd like to make an applet for connecting Bluetooth devices in quickshell.

deviantsemicolon avatar Feb 21 '25 04:02 deviantsemicolon

I worked around this for myself by adding a button that launches a bluetooth app. I personally don't change Bluetooth settings often, and in practice, I don't feel like I'm missing much without an applet. Still, more features is more better :)

import QtQuick
import QtQuick.Layouts
import Quickshell

MouseArea {
    Layout.preferredHeight: parent.height
    Layout.alignment: Qt.AlignHCenter
    Layout.fillHeight: true
    Layout.preferredWidth: icon.implicitWidth
    hoverEnabled: true

    Rectangle {
        id: background
        anchors.fill: parent
        radius: 5

        Image {
            id: icon
            source: "root:/assets/bluetooth.svg"
            height: parent.height * (2 / 3)

            anchors.verticalCenter: parent.verticalCenter
            fillMode: Image.PreserveAspectFit
        }
    }

    onEntered: background.color = "grey"
    onExited: background.color = "transparent"

    onClicked: {
        let entry = DesktopEntries.byId("io.github.kaii_lb.Overskride");
        if (!entry) {
            return;
        }

        entry.execute();
    }
}

jmoggr avatar Feb 21 '25 21:02 jmoggr

This is already tracked internally, and is planned. I have not had the time to do it yet.

My current solution is blueman-tray, which works well enough to be usable in its tray menu. If you want you can filter it out of your normal system tray item list and give it a special button.

outfoxxed avatar Feb 21 '25 23:02 outfoxxed

I created a bluetooth integration for my statusbar using https://github.com/KDE/bluez-qt and found it reasonably user-friendly. It comes with QML modules included.

f-koehler avatar Jun 04 '25 14:06 f-koehler

Added and docs are up https://quickshell-master.outfoxxed.me/docs/types/Quickshell.Bluetooth/

outfoxxed avatar Jul 01 '25 10:07 outfoxxed

👀

deviantsemicolon avatar Jul 01 '25 19:07 deviantsemicolon