Skip to content

Bluetooth

Displays the current bluetooth status. Clicking on the widget opens a popout displaying list of available devices and connection controls.

Screenshot of bluetooth widget

Example

{
end = [
{
type = "bluetooth"
icon_size = 32
format.not_found = ""
format.disabled = " Off"
format.enabled = " On"
format.connected = " {device_alias}"
format.connected_battery = " {device_alias} • {device_battery_percent}%"
popup.max_height.devices = 5
popup.header = " Enable Bluetooth"
popup.disabled = "{adapter_status}"
popup.device.header = "{device_alias}"
popup.device.header_battery = "{device_alias}"
popup.device.footer = "{device_status}"
popup.device.footer_battery = "{device_status} • Battery {device_battery_percent}%"
adapter_status.not_found = "No Bluetooth adapters found"
adapter_status.enabled = "Bluetooth enabled"
adapter_status.enabling = "Enabling Bluetooth..."
adapter_status.disabled = "Bluetooth disabled"
adapter_status.disabling = "Disabling Bluetooth..."
device_status.connected = "Connected"
device_status.connecting = "Connecting..."
device_status.disconnected = "Disconnect"
device_status.disconnecting = "Disconnecting..."
}
]
}

Configuration

Type: bluetooth

Values of {adapter_status} formatting token.

Default: None

Object keys

The value of {adapter_status} formatting token when adapter is disabled.

Type: string
Default: Bluetooth disabled

The value of {adapter_status} formatting token when adapter is disabling.

Type: string
Default: Disabling Bluetooth...

The value of {adapter_status} formatting token when adapter is enabled.

Type: string
Default: Bluetooth enabled

The value of {adapter_status} formatting token when adapter is enabling.

Type: string
Default: Enabling Bluetooth...

The value of {adapter_status} formatting token when adapter not found.

Type: string
Default: No Bluetooth adapters found

Values of {device_status} formatting token.

Default: None

Object keys

The value of {device_status} formatting token when device is connected.

Type: string
Default: Connected

The value of {device_status} formatting token when device is connecting.

Type: string
Default: Connecting...

The value of {device_status} formatting token when device is disconnected.

Type: string
Default: Disconnected

The value of {device_status} formatting token when device is disconnecting.

Type: string
Default: Disconnecting...

Format strings for on-bar button.

Default: None

Object keys

Format string to use for the widget button when bluetooth adapter is enabled and a device is connected.

Type: string
Default:  {device_alias}

Format string to use for the widget button when bluetooth adapter is enabled, a device is connected and {device_battery_percent} is available.

Type: string
Default:  {device_alias} • {device_battery_percent}%

Format string to use for the widget button when bluetooth adapter is disabled.

Type: string
Default:  Off

Format string to use for the widget button when bluetooth adapter is enabled but no devices are connected.

Type: string
Default:  On

Format string to use for the widget button when bluetooth adapter not found.

Type: string
Default: None

Size to render the icons at, in pixels (image icons only).

Type: integer
Default: 32

Popup related configuration.

Default: None

Object keys

Device box related configuration

Default: None

Object keys

Format string to use for the footer of device box.

Type: string
Default: {device_status}

Format string to use for the footer of device box when {device_battery_percent} is available.

Type: string
Default: {device_status} • Battery {device_battery_percent}%

Format string to use for the header of device box.

Type: string
Default: {device_alias}

Format string to use for the header of device box when {device_battery_percent} is available.

Type: string
Default: {device_alias}

Format string to use for the message that is displayed when the adapter is not found or disabled.

Type: string
Default: {adapter_status}

Format string to use for the header of popup window.

Type: string
Default:  Enable Bluetooth

The maximum height the window can reach before scrolling. Specify either as pixels or devices. Leave blank to allow the popup to grow indefinitely.

Default: None

No description provided.

Object keys

No description provided.

Object keys

Styling

SelectorDescription
.bluetoothTray widget button
.bluetooth.not-foundTray widget button when bluetooth adapter not found
.bluetooth.disabledTray widget button when bluetooth adapter is disabled
.bluetooth.enabledTray widget button when bluetooth adapter is enabled but no devices are connected
.bluetooth.connectedTray widget button when bluetooth adapter is enabled and a device is connected
.popup-bluetoothPopup box
.popup-bluetooth .headerHeader box with switch and label
.popup-bluetooth .header .switchBluetooth enable/disable switch
.popup-bluetooth .header .labelBluetooth enable/disable label
.popup-bluetooth .disabledBox that is only shown in non-enabled states (e.g. disabled, adapter not found, etc)
.popup-bluetooth .disabled .spinnerSpinner that is only shown in “connecting” and “disconnecing” states
.popup-bluetooth .disabled .labelLabel inside disabled container
.popup-bluetooth .devicesDevices scrollwindow
.popup-bluetooth .devices .boxBox inside devices scrollwindow
.popup-bluetooth .devices .box .deviceDevice box
.popup-bluetooth .devices .box .device .icon-boxDevice icon box
.popup-bluetooth .devices .box .device .icon-box .iconDevice icon content (any type)
.popup-bluetooth .devices .box .device .icon-box .text-iconDevice icon content (textual only)
.popup-bluetooth .devices .box .device .icon-box .imageDevice icon content (image only)
.popup-bluetooth .devices .box .device .statusDevice status box
.popup-bluetooth .devices .box .device .status .header-labelDevice header label
.popup-bluetooth .devices .box .device .status .footer-labelDevice footer label
.popup-bluetooth .devices .box .device .switchDevice connect/disconnect switch
.popup-bluetooth .devices .box .device .spinnerSpinner that is only shown in “connecting” and “disconnecing” states

For more information on styling, please see the styling guide.