2020-01-26 05:34:31 +01:00
waybar-bluetooth(5)
# NAME
waybar - bluetooth module
# DESCRIPTION
2022-05-06 16:17:11 +02:00
The * bluetooth * module displays information about a bluetooth controller and its connections.
2020-01-26 05:34:31 +01:00
# CONFIGURATION
Addressed by * bluetooth *
2022-05-06 00:38:04 +02:00
* controller * : ++
2022-05-02 18:11:21 +02:00
typeof: string ++
2023-10-21 21:15:25 +05:30
Use the controller with the defined alias. Otherwise, a random controller is used. Recommended to define when there is more than 1 controller available to the system.
2022-05-02 18:11:21 +02:00
* format-device-preference * : ++
typeof: array ++
2022-05-06 16:17:11 +02:00
A ranking of bluetooth devices, addressed by their alias. The order is from *first displayed* to *last displayed*. ++
If this config option is not defined or none of the devices in the list are connected, it will fall back to showing the last connected device.
2022-05-02 18:11:21 +02:00
2020-01-26 05:34:31 +01:00
* format * : ++
typeof: string ++
2022-05-02 18:11:21 +02:00
default: * {status}* ++
2020-01-26 05:34:31 +01:00
The format, how information should be displayed. This format is used when other formats aren't specified.
2022-05-02 18:11:21 +02:00
* format-disabled * : ++
typeof: string ++
2022-05-06 00:38:04 +02:00
This format is used when the displayed controller is disabled.
2022-05-02 18:11:21 +02:00
* format-off * : ++
typeof: string ++
2022-05-06 00:38:04 +02:00
This format is used when the displayed controller is turned off.
2022-05-02 18:11:21 +02:00
* format-on * : ++
typeof: string ++
2022-05-06 00:38:04 +02:00
This format is used when the displayed controller is turned on with no devices connected.
2022-05-02 18:11:21 +02:00
* format-connected * : ++
typeof: string ++
2022-05-06 00:38:04 +02:00
This format is used when the displayed controller is connected to at least 1 device.
2022-05-02 18:11:21 +02:00
2023-08-16 15:34:06 +02:00
* format-no-controller * : ++
typeof: string ++
2023-10-21 21:15:25 +05:30
This format is used when no bluetooth controller can be found
2023-08-16 15:34:06 +02:00
2022-05-28 12:35:08 +02:00
* format-icons * : ++
typeof: array/object ++
Based on the current battery percentage (see section *EXPERIMENTAL BATTERY PERCENTAGE FEATURE*), the corresponding icon gets selected. ++
The order is *low* to *high*. Will only show the current battery percentage icon in the *\*-connected-battery* config options. ++
Or by the state if it is an object. It will fall back to the enabled state if its derivatives are not defined (on, off, connected).
2020-01-26 05:34:31 +01:00
* rotate * : ++
typeof: integer ++
Positive value to rotate the text label.
* max-length * : ++
typeof: integer ++
The maximum length in character the module should display.
2021-02-01 08:34:51 -08:00
* min-length * : ++
2023-07-30 17:33:02 +02:00
typeof: integer ++
2023-10-21 21:15:25 +05:30
The minimum length in characters the module should accept.
2021-02-01 08:34:51 -08:00
* align * : ++
2023-07-30 17:33:02 +02:00
typeof: float ++
2024-03-04 20:00:57 +01:00
The alignment of the label within the module, where 0 is left-aligned and 1 is right-aligned. If the module is rotated, it will follow the flow of the text.
* justify * : ++
typeof: string ++
The alignment of the text within the module's label, allowing options 'left', 'right', or 'center' to define the positioning.
2021-02-01 08:34:51 -08:00
2020-01-26 05:34:31 +01:00
* on-click * : ++
typeof: string ++
Command to execute when clicked on the module.
* on-click-middle * : ++
typeof: string ++
Command to execute when middle-clicked on the module using mousewheel.
* on-click-right * : ++
typeof: string ++
2023-10-21 21:15:25 +05:30
Command to execute when you right-click on the module.
2020-01-26 05:34:31 +01:00
* on-scroll-up * : ++
typeof: string ++
Command to execute when scrolling up on the module.
* on-scroll-down * : ++
typeof: string ++
Command to execute when scrolling down on the module.
* smooth-scrolling-threshold * : ++
typeof: double ++
Threshold to be used when scrolling.
* tooltip * : ++
typeof: bool ++
default: *true* ++
Option to disable tooltip on hover.
* tooltip-format * : ++
typeof: string ++
The format, how information should be displayed in the tooltip. This format is used when other formats aren't specified.
2022-05-02 18:11:21 +02:00
* tooltip-format-disabled * : ++
typeof: string ++
2022-05-06 00:38:04 +02:00
This format is used when the displayed controller is disabled.
2022-05-02 18:11:21 +02:00
* tooltip-format-off * : ++
typeof: string ++
2022-05-06 00:38:04 +02:00
This format is used when the displayed controller is turned off.
2022-05-02 18:11:21 +02:00
* tooltip-format-on * : ++
typeof: string ++
2022-05-06 00:38:04 +02:00
This format is used when the displayed controller is turned on with no devices connected.
2022-05-02 18:11:21 +02:00
* tooltip-format-connected * : ++
typeof: string ++
2022-05-06 00:38:04 +02:00
This format is used when the displayed controller is connected to at least 1 device.
2022-05-02 18:11:21 +02:00
2023-08-16 15:34:06 +02:00
* tooltip-format-no-controller * : ++
typeof: string ++
2023-10-21 21:15:25 +05:30
This format is used when no bluetooth controller can be found
2023-08-16 15:34:06 +02:00
2022-05-04 18:27:29 +02:00
* tooltip-format-enumerate-connected * : ++
typeof: string ++
This format is used to define how each connected device should be displayed within the *device_enumerate* format replacement in the tooltip menu.
2020-01-26 05:34:31 +01:00
# FORMAT REPLACEMENTS
* {status} * : Status of the bluetooth device.
2022-05-28 12:35:08 +02:00
* {icon} * : Icon, as defined in * format-icons * .
2022-05-06 16:17:11 +02:00
* {num_connections} * : Number of connections the displayed controller has.
2022-05-02 18:11:21 +02:00
2022-05-06 16:17:11 +02:00
* {controller_address} * : Address of the displayed controller.
2022-05-02 18:11:21 +02:00
2022-05-06 16:17:11 +02:00
* {controller_address_type} * : Address type of the displayed controller.
2022-05-02 18:11:21 +02:00
2022-05-06 16:17:11 +02:00
* {controller_alias} * : Alias of the displayed controller.
2022-05-02 18:11:21 +02:00
2022-05-06 16:17:11 +02:00
* {device_address} * : Address of the displayed device.
2022-05-02 18:11:21 +02:00
2022-05-06 16:17:11 +02:00
* {device_address_type} * : Address type of the displayed device.
2022-05-02 18:11:21 +02:00
2022-05-06 16:17:11 +02:00
* {device_alias} * : Alias of the displayed device.
2022-05-02 18:11:21 +02:00
2022-11-04 15:03:10 +01:00
* {device_enumerate} * : Show a list of all connected devices, each on a separate line. Define the format of each device with the * tooltip-format-enumerate-connected * ++
2023-10-21 21:15:25 +05:30
and/or * tooltip-format-enumerate-connected-battery * config options. Can only be used in the tooltip-related format options.
2020-01-26 05:34:31 +01:00
2022-05-06 16:17:11 +02:00
# EXPERIMENTAL BATTERY PERCENTAGE FEATURE
At the time of writing, the experimental features of BlueZ need to be turned on, for the battery percentage options listed below to work.
## FORMAT REPLACEMENT
* {device_battery_percentage} * : Battery percentage of the displayed device if available. Use only in the config options defined below.
## CONFIGURATION
* format-connected-battery * : ++
typeof: string ++
This format is used when the displayed device provides its battery percentage.
* tooltip-format-connected-battery * : ++
typeof: string ++
This format is used when the displayed device provides its battery percentage.
* tooltip-format-enumerate-connected-battery * : ++
typeof: string ++
This format is used to define how each connected device with a battery should be displayed within the *device_enumerate* format replacement option. ++
When this config option is not defined, it will fall back on the *tooltip-format-enumerate-connected* config option.
2020-01-26 05:34:31 +01:00
2022-05-04 18:27:29 +02:00
# EXAMPLES
2022-05-02 18:11:21 +02:00
```
"bluetooth": {
2022-05-06 16:17:11 +02:00
// "controller": "controller1", // specify the alias of the controller if there are more than 1 on the system
2022-05-02 18:11:21 +02:00
"format": " {status}",
2022-05-07 13:42:27 +02:00
"format-disabled": "", // an empty format will hide the module
2022-05-04 18:27:29 +02:00
"format-connected": " {num_connections} connected",
2022-05-06 16:17:11 +02:00
"tooltip-format": "{controller_alias}\\t{controller_address}",
"tooltip-format-connected": "{controller_alias}\\t{controller_address}\\n\\n{device_enumerate}",
"tooltip-format-enumerate-connected": "{device_alias}\\t{device_address}"
2022-05-04 18:27:29 +02:00
}
```
```
"bluetooth": {
"format": " {status}",
2022-05-06 16:17:11 +02:00
"format-connected": " {device_alias}",
"format-connected-battery": " {device_alias} {device_battery_percentage}%",
// "format-device-preference": [ "device1", "device2" ], // preference list deciding the displayed device
"tooltip-format": "{controller_alias}\\t{controller_address}\\n\\n{num_connections} connected",
"tooltip-format-connected": "{controller_alias}\\t{controller_address}\\n\\n{num_connections} connected\\n\\n{device_enumerate}",
"tooltip-format-enumerate-connected": "{device_alias}\\t{device_address}",
"tooltip-format-enumerate-connected-battery": "{device_alias}\\t{device_address}\\t{device_battery_percentage}%"
2020-01-26 05:34:31 +01:00
}
```
# STYLE
- * #bluetooth *
2022-04-12 10:26:21 +02:00
- * #bluetooth.disabled *
2022-05-02 18:11:21 +02:00
- * #bluetooth.off *
- * #bluetooth.on *
- * #bluetooth.connected *
- * #bluetooth.discoverable *
- * #bluetooth.discovering *
- * #bluetooth.pairable *