Skip to content

Conversation

@bbedward
Copy link
Contributor

Implements a bluetooth pairing agent that is required to pair a variety of devices.

Currently, you're unable to pair any device that requires a pin, confirmation dialog, passkey, etc. Hopefully this can bring quickshell closer to being a replacement for blueman, bluetoothctl commands, etc.

It sends a signal when a device needs confirmation, pin, etc. IE:

Connections {
    target: Bluetooth.agent

    function onPairingRequested(deviceAddress, type, passkey, token) {
        switch (type) {
        case BluetoothPairingRequestType.Authorization:
            // Show "Allow pairing?" dialog
            Bluetooth.agent.respondToRequest(token, true) // Accept
            break

        case BluetoothPairingRequestType.Confirmation:
            // Show "Confirm passkey: ${passkey}?" dialog
            Bluetooth.agent.respondToRequest(token, true) // Accept
            break

        case BluetoothPairingRequestType.PinCode:
            // Show PIN entry dialog
            Bluetooth.agent.respondWithPinCode(token, "1234")
            break

        case BluetoothPairingRequestType.Passkey:
            // Show numeric entry dialog
            Bluetooth.agent.respondWithPasskey(token, 123456)
            break
        }
    }
}

bbedward added a commit to AvengeMedia/DankMaterialShell that referenced this pull request Jul 22, 2025
- Allows connecting pin/passkey/confirmation dialogs
- Fixes inability to connect to many devices
- Dependent on un-merged quickshell PR: quickshell-mirror/quickshell#138
@outfoxxed
Copy link
Member

This is not how I want to handle this implementation or interface wise, and I already have an implementation in a local worktree. My apologies but I'm going to close this.

Please make an issue or ping me in one of the chat rooms before writing anything substantial next time

@outfoxxed outfoxxed closed this Jul 23, 2025
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.

2 participants