1waybar-bluetooth(5) File Formats Manual waybar-bluetooth(5)
2
3
4
6 waybar - bluetooth module
7
9 The bluetooth module displays information about a bluetooth controller
10 and its connections.
11
13 Addressed by bluetooth
14
15 controller:
16 typeof: string
17 Use the controller with the defined alias. Otherwise, a random
18 controller is used. Recommended to define when there is more than 1
19 controller available to the system.
20
21 format-device-preference:
22 typeof: array
23 A ranking of bluetooth devices, addressed by their alias. The or‐
24 der is from first displayed to last displayed.
25 If this config option is not defined or none of the devices in the
26 list are connected, it will fall back to showing the last connected de‐
27 vice.
28
29 format:
30 typeof: string
31 default: {status}
32 The format, how information should be displayed. This format is
33 used when other formats aren't specified.
34
35 format-disabled:
36 typeof: string
37 This format is used when the displayed controller is disabled.
38
39 format-off:
40 typeof: string
41 This format is used when the displayed controller is turned off.
42
43 format-on:
44 typeof: string
45 This format is used when the displayed controller is turned on
46 with no devices connected.
47
48 format-connected:
49 typeof: string
50 This format is used when the displayed controller is connected to
51 at least 1 device.
52
53 format-no-controller:
54 typeof: string
55 This format is used when no bluetooth controller can be found
56
57 format-icons:
58 typeof: array/object
59 Based on the current battery percentage (see section EXPERIMENTAL
60 BATTERY PERCENTAGE FEATURE), the corresponding icon gets selected.
61 The order is low to high. Will only show the current battery per‐
62 centage icon in the *-connected-battery config options.
63 Or by the state if it is an object. It will fall back to the en‐
64 abled state if its derivatives are not defined (on, off, connected).
65
66 rotate:
67 typeof: integer
68 Positive value to rotate the text label.
69
70 max-length:
71 typeof: integer
72 The maximum length in character the module should display.
73
74 min-length:
75 typeof: integer
76 The minimum length in characters the module should accept.
77
78 align:
79 typeof: float
80 The alignment of the text, where 0 is left-aligned and 1 is right-
81 aligned. If the module is rotated, it will follow the flow of the text.
82
83 on-click:
84 typeof: string
85 Command to execute when clicked on the module.
86
87 on-click-middle:
88 typeof: string
89 Command to execute when middle-clicked on the module using mouse‐
90 wheel.
91
92 on-click-right:
93 typeof: string
94 Command to execute when you right-click on the module.
95
96 on-scroll-up:
97 typeof: string
98 Command to execute when scrolling up on the module.
99
100 on-scroll-down:
101 typeof: string
102 Command to execute when scrolling down on the module.
103
104 smooth-scrolling-threshold:
105 typeof: double
106 Threshold to be used when scrolling.
107
108 tooltip:
109 typeof: bool
110 default: true
111 Option to disable tooltip on hover.
112
113 tooltip-format:
114 typeof: string
115 The format, how information should be displayed in the tooltip.
116 This format is used when other formats aren't specified.
117
118 tooltip-format-disabled:
119 typeof: string
120 This format is used when the displayed controller is disabled.
121
122 tooltip-format-off:
123 typeof: string
124 This format is used when the displayed controller is turned off.
125
126 tooltip-format-on:
127 typeof: string
128 This format is used when the displayed controller is turned on
129 with no devices connected.
130
131 tooltip-format-connected:
132 typeof: string
133 This format is used when the displayed controller is connected to
134 at least 1 device.
135
136 tooltip-format-no-controller:
137 typeof: string
138 This format is used when no bluetooth controller can be found
139
140 tooltip-format-enumerate-connected:
141 typeof: string
142 This format is used to define how each connected device should be
143 displayed within the device_enumerate format replacement in the tooltip
144 menu.
145
147 {status}: Status of the bluetooth device.
148
149 {icon}: Icon, as defined in format-icons.
150
151 {num_connections}: Number of connections the displayed controller has.
152
153 {controller_address}: Address of the displayed controller.
154
155 {controller_address_type}: Address type of the displayed controller.
156
157 {controller_alias}: Alias of the displayed controller.
158
159 {device_address}: Address of the displayed device.
160
161 {device_address_type}: Address type of the displayed device.
162
163 {device_alias}: Alias of the displayed device.
164
165 {device_enumerate}: Show a list of all connected devices, each on a
166 separate line. Define the format of each device with the tooltip-for‐
167 mat-enumerate-connected
168 and/or tooltip-format-enumerate-connected-battery config options. Can
169 only be used in the tooltip-related format options.
170
172 At the time of writing, the experimental features of BlueZ need to be
173 turned on, for the battery percentage options listed below to work.
174
175 FORMAT REPLACEMENT
176 {device_battery_percentage}: Battery percentage of the displayed device
177 if available. Use only in the config options defined below.
178
179 CONFIGURATION
180 format-connected-battery:
181 typeof: string
182 This format is used when the displayed device provides its battery
183 percentage.
184
185 tooltip-format-connected-battery:
186 typeof: string
187 This format is used when the displayed device provides its battery
188 percentage.
189
190 tooltip-format-enumerate-connected-battery:
191 typeof: string
192 This format is used to define how each connected device with a
193 battery should be displayed within the device_enumerate format replace‐
194 ment option.
195 When this config option is not defined, it will fall back on the
196 tooltip-format-enumerate-connected config option.
197
199 "bluetooth": {
200 // "controller": "controller1", // specify the alias of the controller if there are more than 1 on the system
201 "format": " {status}",
202 "format-disabled": "", // an empty format will hide the module
203 "format-connected": " {num_connections} connected",
204 "tooltip-format": "{controller_alias}\t{controller_address}",
205 "tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{device_enumerate}",
206 "tooltip-format-enumerate-connected": "{device_alias}\t{device_address}"
207 }
208
209 "bluetooth": {
210 "format": " {status}",
211 "format-connected": " {device_alias}",
212 "format-connected-battery": " {device_alias} {device_battery_percentage}%",
213 // "format-device-preference": [ "device1", "device2" ], // preference list deciding the displayed device
214 "tooltip-format": "{controller_alias}\t{controller_address}\n\n{num_connections} connected",
215 "tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}",
216 "tooltip-format-enumerate-connected": "{device_alias}\t{device_address}",
217 "tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%"
218 }
219
221 • #bluetooth
222 • #bluetooth.disabled
223 • #bluetooth.off
224 • #bluetooth.on
225 • #bluetooth.connected
226 • #bluetooth.discoverable
227 • #bluetooth.discovering
228 • #bluetooth.pairable
229
230
231
232 2023-11-05 waybar-bluetooth(5)