Quickshell


BluetoothDevice: QtObject

uncreatable
import Quickshell.Bluetooth
A tracked Bluetooth device.

Properties [?]

  • deviceName string
    readonly

    The name of the Bluetooth device, ignoring user provided aliases. See also Go to name which returns a user provided alias if set.

  • icon string
    readonly

    System icon representing the device type. Use Quickshell.iconPath() to display this in an image.

  • bonded bool
    readonly

    True if pairing information is stored for future connections.

  • battery real
    readonly

    Battery level of the connected device, from 0.0 to 1.0. Only valid if Go to batteryAvailable is true.

  • pairing bool
    readonly

    True if the device is currently being paired.

    NOTE

    cancelPair() can be used to cancel the pairing process.

  • state BluetoothDeviceState
    readonly

    Connection state of the device.

  • adapter BluetoothAdapter
    readonly

    The Bluetooth adapter this device belongs to.

  • batteryAvailable bool
    readonly

    True if the connected device reports its battery level. Battery level can be accessed via Go to battery.

  • trusted bool

    True if the device is considered to be trusted by the system. Trusted devices are allowed to reconnect themselves to the system without intervention.

  • wakeAllowed bool

    True if the device is allowed to wake up the host system from suspend.

  • dbusPath string
    readonly

    DBus path of the device under the org.bluez system service.

  • blocked bool

    True if the device is blocked from connecting. If a device is blocked, any connection attempts will be immediately rejected by the system.

  • name string

    The name of the Bluetooth device. This property may be written to create an alias, or set to an empty string to fall back to the device provided name.

    See Go to deviceName for the name provided by the device.

  • address string
    readonly

    MAC address of the device.

  • connected bool

    True if the device is currently connected to the computer.

    Setting this property is equivalent to calling connect() and disconnect().

    NOTE

    Go to state provides more detailed information if required.

  • paired bool
    readonly

    True if the device is paired to the computer.

    NOTE

    pair() can be used to pair a device, however you must forget() the device to unpair it.

Functions [?]

  • cancelPair() void

    Cancel an active pairing attempt.

  • connect() void

    Attempt to connect to the device.

  • disconnect() void

    Disconnect from the device.

  • forget() void

    Forget the device.

  • pair() void

    Attempt to pair the device.

    NOTE

    Go to paired and Go to pairing return the current pairing status of the device.