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