Bluetooth#

class ignis.services.bluetooth.BluetoothService None#

A Bluetooth service. Requires gnome-bluetooth-3.0.

device_added(*args)#
  • Signal

Emitted when a Bluetooth device has been added.

Parameters:

device (BluetoothDevice) -- The instance of the Bluetooth device.

property client: gi.repository.GnomeBluetooth.Client#
  • read-only

An instance of GnomeBluetooth.Client.

property devices: list[BluetoothDevice]#
  • read-only

A list of all Bluetooth devices.

property connected_devices: list[BluetoothDevice]#
  • read-only

A list of currently connected Bluetooth devices.

property powered: bool#
  • read-write

Whether the default Bluetooth adapter is powered.

property state: str#
  • read-only

The current state of the default Bluetooth adapter.

Adapter state:
  • absent

  • on

  • turning-on

  • turning-off

  • off

property setup_mode: bool#
  • read-write

Whether the default Bluetooth adapter is in setup mode (discoverable, and discovering).

Set to True to start scanning devices.

class ignis.services.bluetooth.BluetoothDevice(client: gi.repository.GnomeBluetooth.Client, gdevice: gi.repository.GnomeBluetooth.Device) None#

A Bluetooth device.

removed()#
  • Signal

Emitted when the device has been removed.

property gdevice: gi.repository.GnomeBluetooth.Device#
  • read-only

The instance of GnomeBluetooth.Device for this device.

property address: str#
  • read-only

The Bluetooth device address of the device.

property alias: str#
  • read-only

The name alias for the device.

property battery_level: int#
  • read-only

The current battery level of the device (if available).

property battery_percentage: float#
  • read-only

The current battery percentage of the device (if available).

property connectable: bool#
  • read-only

Whether it is possible to connect to the device.

property connected: bool#
  • read-only

Whether the device is currently connected.

property icon_name: str#
  • read-only

The current icon name of the device.

property name: str#
  • read-only

The complete device name. It is better to use the alias property when displaying the device name.

property paired: bool#
  • read-only

Whether the device is paired.

property trusted: bool#
  • read-only

Whether the remote is seen as trusted.

property device_type: str#
  • read-only

The type of the device, e.g., "mouse", "speakers".

For more device types, see GnomeBluetooth.Type.

connect_to() None#

Connect to this device.

Return type:

None

disconnect_from() None#

Disconnect from this device.

Return type:

None