-
Notifications
You must be signed in to change notification settings - Fork 79
/
config.yaml
510 lines (482 loc) · 23.6 KB
/
config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
# Configuration for Yasb (Yet Another Status Bar)
# Author: @denBot
# Last updated: 21/08/2023
# General Bar Configuration Notes:
# - All bars must be defined in within the `bars` section
# - Each bar configuration should be defined using a name, e.g. 'yasb-bar', 'my-awesome-bar', etc.
# - Default bar options can be found at: https://github.com/denBot/yasb/blob/main/src/core/validation/bar.py#L1-L10
# General Widget Configuration Notes:
# - ALL configured widgets must be defined in within the `widgets` section of this config file
# - Each widget configuration should be allocated a unique name, e.g. 'my-widget', 'my-custom-clock', etc.
# > This makes it easier for you to keep track of your configured widgets and add them to your bar(s)
# - Each widget should specify a widget `type` - this points to the python class of the widget you are configuring
# > For example: type: "yasb.clock.ClockWidget"
# - Each widget supports mouse event callback functionality (left, middle, right click).
# > The callbacks "do_nothing" and "exec" can be used across any widget which allows them.
# > "exec" allows you to run programs from the command-line, where each argument is separated by a space
# > "do_nothing" allows you to override default mouse events to do nothing
# > "toggle_label" *some widgets* allow you to toggle between two label formats
# - Example callbacks:
# on_left: "exec wt.exe" -- run the windows terminal when the widget is left-clicked
# on_middle: "do_nothing" -- overrides default widget middle-click behaviour to do nothing
# on_right: "exec cmd /c Taskmg" -- open the task manager when the widget is right-clicked
# bars:
# ^ a list of your bar configurations
# yasb-bar:
# ^ the name of your bar
# enabled: true
# ^ Specify if the bar configuration should be loaded by yasb
# screens: ['*']
# ^ A list of screen names which the bar should be displayed on
# Accepts: a list of screen names
# Example: [ "\\.\DISPLAY1", "eDP-1", "HDMI-1" ]
# Wildcard '*' is used to show the bar on all screens
# class_name: 'yab-bar'
# ^ The CSS class name used to style the bar and all of its children (widgets).
# alignment:
# ^ alignment options are configured here
# position: 'top' or 'bottom'
# ^ The vertical positioning of the bar on the screen
# center: false
# ^ Specify if the bar should be horizontally centered on the screen.
# window_flags:
# ^ special window flags can be enabled here
# always_on_top: false
# ^ Forces all windows of lower window levels underneath the bar (even in full-screen).
# windows_app_bar: false
# ^ Exclusively reserve the desktop workspace area behind the bar, just like the Windows Taskbar.
# dimensions:
# ^ the dimensions of the bar can be set here
# width: "100%"
# ^ The width of the bar (in percentage or pixels). Accepts: string (percentage) or positive integer (pixels) # height: 30
# ^ The height of the bar (in pixels). Accepts: positive integer (pixels e.g. 20)
# offset:
# x: 0
# ^ The x-axis positioning offset of the bar. Accepts: integer
# y: 0
# ^ The y-axis positioning offset of the bar. Accepts: integer
# widgets:
# left: []
# ^ A list of widget names to be placed on the left side of the bar. Accepts: list of strings (widget names / types)
# center: []
# ^ A list of widget names to be placed at the center of the bar. Accepts: list of strings (widget names / types)
# right: []
# ^ A list of widget names to be placed on the right side of the bar. Accepts: list of strings (widget names / types)
watch_stylesheet: true
watch_config: true
bars:
yasb-bar:
enabled: true
screens: ['*']
class_name: "yasb-bar"
alignment:
position: "top"
center: false
blur_effect:
enabled: false
acrylic: false
dark: false
window_flags:
always_on_top: false
windows_app_bar: true
dimensions:
width: "100%"
height: 32
padding:
top: 0
left: 0
bottom: 0
right: 0
widgets:
left: ["komorebi_workspaces", "komorebi_active_layout", "active_window"]
center: ["clock"]
right: ["explorer_button", "wifi", "cpu", "memory", "battery"]
# widgets:
# my-clock-widget:
# type: "yasb.clock.ClockWidget"
# options:
# label: "{%H:%M:%S}"
# ^ The label format of the widget. Accepts: string with datetime format enclosed between curly brackets
# ^ Label format options: https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes
# label_alt: "{%d-%m-%y %H:%M:%S}"
# ^ The alternate label format of the widget. Accepts: string with datetime format enclosed between curly brackets
# update_interval: 1000
# ^ The interval at which the widget will update itself. Accepts: positive integer (number of milliseconds)
# timezones: []
# ^ A list of timezones to switch between. Accepts: list of strings (e.g. Europe/London, America/New_York)
# ^ Options: https://timezonedb.com/time-zones ('Time Zone' strings)
# callbacks:
# on_left: "toggle_label" - toggles between the clock and alternate clock labels
# on_middle: "do_nothing"
# on_right: "next_timezone" - cycles the next timezone to be shown by the clock
# memory-widget:
# type: "yasb.memory.MemoryWidget"
# options:
# label: "\uf538 {virtual_mem_free}/{virtual_mem_total}"
# ^ The format label for the widget. Accepts: string containing any of the below format options:
# {virtual_mem_free} : The amount of free virtual memory
# {virtual_mem_percent} : The percentage of free virtual memory
# {virtual_mem_total} : The amount of total virtual memory
# {virtual_mem_avail} : The amount of total available virtual memory
# {swap_mem_free} : The amount of free swap memory
# {swap_mem_percent} : The percentage of free swal memory
# {swap_mem_total} : The amount of total swap memory
# label_alt: "\uf538 VIRT: {virtual_mem_percent}% SWAP: {swap_mem_percent}%"
# ^ The alternate format label for the widget. Accepts: string containing any of the above format options
# update_interval: 1000
# ^ The interval at which the widget will update itself. Accepts: positive integer (number of milliseconds)
# memory_thresholds: All options accept a positive integer between 0 and 100
# low: 25
# ^ The percentage at which the .status-low CSS class is applied. Accepts integer from 0 to 100
# medium: 50
# ^ The percentage at which the .status-medium CSS class is applied. Accepts integer from 0 to 100
# high: 90
# ^ The percentage at which the .status-high CSS class is applied. Accepts integer from 0 to 100
# callbacks:
# on_left: "toggle_label" - toggles between the clock and alternate clock labels
# on_middle: "do_nothing"
# on_right:" "do_nothing"
# battery-widget:
# type: "yasb.battery.BatteryWidget"
# options:
# label: "{icon}"
# ^ The format label for the widget. Accepts: string containing any of the below format options
# {percent} : The current battery percentage
# {time_remaining} : The estimated battery duration remaining
# {is_charging} : The boolean charging status
# {icon} : The battery status icon
# label_alt: "{percent}% | remaining: {time_remaining}"
# ^ The alternate format label for the widget. Accepts: string
# update_interval: 1000
# ^ The interval at which the widget will update itself. Accepts: positive integer
# charging_options:
# icon_format: "{charging_icon} {icon}"
# ^ The charging icon position relative to the battery icon. Accepts string containing {charging_icon} and {icon}
# blink_charging_icon: True
# ^ Specify if the charging icon should blink at each update interval period
# status_thresholds:
# critical: 10
# ^ The percentage at which the .status-critical CSS class is applied Accepts: integer from 0 to 100
# low: 25
# ^ The max percentage at which the .status-low CSS class is applied Accepts: integer from 0 to 100
# medium: 75
# ^ The max percentage at which the .status-medium CSS class is applied Accepts: integer from 0 to 100
# high: 95
# ^ The max percentage at which the .status-high CSS class is applied Accepts: integer from 0 to 100
# full: 100
# ^ The max percentage at which the .status-full CSS class is applied. Accepts: integer from 0 to 100
# status_icons:
# icon_charging: "\uf0e7"
# ^ The icon shown when the battery is charging. Accepts: string
# icon_critical: "\uf244"
# ^ The icon shown when critical battery status threshold is reached
# icon_low: "\uf243"
# ^ The icon shown when low battery status threshold is reached
# icon_medium: "\uf242"
# ^ The icon shown when medium status threshold is reached
# icon_high: "\uf241"
# ^ The icon shown when high status threshold is reached
# icon_full: "\uf240"
# ^ The icon shown when full status threshold is reached
# callbacks:
# on_left: "toggle_label" - toggles between the clock and alternate clock labels
# on_middle: "do_nothing"
# on_right: "do_nothing"
# cpu-widget:
# type: "yasb.cpu.CpuWidget"
# options:
# label: "{info[histograms][cpu_percent]}"
# ^ The format label for the widget. Accepts: string containing any of the below format options
# {info[cores][physical]} - The total number of physical cores available to the system
# {info[cores][total]} - The total number of cores available to the system
# {info[freq][min]} - The minimum possible frequency of the CPU
# {info[freq][max]} - The maximum possible frequency of the CPU
# {info[freq][current]} - The current frequency of the CPU
# {info[stats][context_switches]} - The number of context switches performed since boot
# {info[stats][interrupts] - The number of interrupts performed since boot
# {info[stats][soft_interrupts] - The number of soft interrupts performed since boot
# {info[stats][sys_calls] - The number of system calls performed since boot
# {info[histograms][cpu_freq] - A unicode histogram representation of the lat N CPU frequency readings
# {info[histograms][cpu_percent] - A unicode histogram representation of the last N CPU percent readings
# {info[histograms][cores] - A unicode histogram representation of the percentage of all system CPU cores
# label_alt: "{percent}% | remaining: {time_remaining}"
# ^ The alternate format label for the widget. Accepts: string
# update_interval: 1000
# ^ The interval at which the CPU widget will update. Accepts: positive integer
# histogram_icons:
# ^ The unicode characters used to represent CPU the frequency/percentage histogram data. Accepts: list of 9 unicode strings.
# ^ Note: the below unicode characters require the following graph bars font: https://github.com/and3rson/graph-bars-font
# - ' ' # 0%
# - '\u2581' # 10%
# - '\u2582' # 20%
# - '\u2583' # 30%
# - '\u2584' # 40%
# - '\u2585' # 50%
# - '\u2586' # 60%
# - '\u2587' # 70%
# - '\u2588' # 80%+
# histogram_num_columns: 10
# ^ The number of columns displayed for each generated histogram. Accepts: positive integer between 0 and 128.
# callbacks:
# on_left: "toggle_label" - toggles between the cpu and alternate cpu labels
# on_middle: "do_nothing"
# on_right: "do_nothing"
# active-window-widget:
# type: "yasb.active_window.ActiveWindowWidget"
# options:
# label: "{win[title]}"
# ^ The format label for the widget. Accepts: string containing any of the below {win} format options
# win[hwnd] - the hwnd of the active window
# win[event] - the event which focused the active window
# win[title] - the active window title
# win[class_name] - the active window class_name
# win[monitor_hwnd] - the hwnd of the monitor displaying the application
# win[monitor_info][rect][x,y,width,height] - the dimensions of the screen
# win[monitor_info][rect_work_area][x,y,width,height] - the dimensions of the screen work area
# win[monitor_info][flags] - the flags assocaited with the screen
# win[monitor_info][device] - the device name of the screen
# win[process][name] - the name of the active window process
# win[process][pid] - the process id of the parent process
# win[process][ppid] - the parent process id
# win[process][cpu_num] - the number of CPUs being used
# win[process][cpu_percent] - the window cpu usage in percent
# win[process][mem_percent] - the window memory usage in percent
# win[process][num_threads] - the windows number of threads in use
# win[process][username] - the username of the user executing the window process
# win[process][status] - the status of the process
# label_alt: "[class_name='{win[class_name]}' exe='{win[process][name]}' hwnd={win[hwnd]}]"
# ^ The format label for the widget. Accepts: string containing any of the above {win} format options
# label_no_window: ""
# ^ The label shown when no window is active. Accepts: string
# max_length: None
# ^ The max length of the active window label. Accepts: positive integer or None
# max_length_ellipsis: "..."
# ^ The ellipsis string used when truncating the window label if it exceeds the max length. Accepts: string
# monitor_exclusive: true
# ^ Specifies if the active window title should be shown on all bars, or exclusively for the bars on the active window screen
# ignore_window:
# class: []
# ^ A list of class_names the widget should ignore. Accepts: list of strings
# process: []
# ^ A list of process names the widget should ignore. Accepts: list of strings
# titles:
# ^ A list of titles the widget should ignore. Accepts: list of strings
# callbacks:
# on_left: "toggle_label" - toggles between the clock and alternate clock labels
# on_middle: "do_nothing"
# on_right: "do_nothing"
# komorebi_workspaces:
# type: "komorebi.workspaces.WorkspacesWidget"
# options:
# label_offline: "Komorebi Offline"
# ^ The message shown when YASB cannot connect with the komorebi window manager. Accepts: string
# label_workspace_btn: "{index}"
# ^ The label format for all workspace buttons. Accepts: string.
# Format options: {name}, {index}, {monitor_index}
# label_default_name: "{index}"
# ^ The default name value used if no workspace name is set via Komorebi. Accepts: string
# Format options: {index}, {monitor_index}
# label_zero_index: false
# ^ Specifies if the workspace and monitor index values should be zero-indexed. Accepts: boolean
# hide_empty_workspaces: False
# ^ Specifies if empty workspaces should be shown in the list of komorebi workspaces. Accepts: boolean
# komorebi_active_layout:
# type: "komorebi.active_layout.ActiveLayoutWidget"
# options:
# hide_if_offline: false
# ^ Specifies if the active layout label should be shown when komorebi is offline
# label: "{icon}"
# ^ The label shown when an active layout change is detected. Accepts: string containing format options {icon} and {layout_name}
# layout_icons:
# bsp: "[\\]"
# columns: "[||]"
# rows: "[---]"
# vertical_stack: "[]="
# horizontal_stack: "H/="
# ultrawide_vertical_stack: "[|]="
# monocle: "[M]"
# maximised: "[X]"
# floating: "><>"
# paused: "|P|"
# callbacks
# ^ callback options include:
# "next_layout" - Cycles the next layout for the active workspace
# "prev_layout" - Cycles the previous layout for the active workspace
# "flip_layout" - Flips layout of active workspace. Works for BSP tiling mode only
# "toggle_tiling" - Toggles tiling of all windows for the active workspace
# "toggle_float" - Toggles floating of active window for current workspace
# "toggle_monocle" - Toggles monocle mode for active window for current workspace
# "toggle_maximise" - Toggles maximising active window for current workspace
# "toggle_pause" - Toggles pausing komorebi on/off for all workspaces
# on_left: "next_layout"
# on_middle: "toggle_monocle"
# on_right: "prev_layout"
# custom-weather-widget-example:
# type: "yasb.clock.CustomWidget"
# options:
# label: "Temperature: {data[current][temp]}°"
# ^ The format label for the custom widget. Accepts: string containing {data} format options. Required field.
# If the command executed returns a JSON structure,
# the JSON object can be used within the format label using the python dictionary string formatting syntax.
# - data = "curl.exe wttr.in/..."
# - data = {"current_condition": [{"temp_C":16, "humidity":71}], ...}
# label_alt: "Temperature: {data[current_condition][0][temp_C]}%"
# ^ The alternate format label for the clock. Accepts: string containing {data} format options. Required field.
# label_max_length: None
# ^ The maximum length of the label. Accepts: positive integer
# class_name: 'my-weather-widget'
# ^ The CSS class name of the custom widget. Accepts: string. Required field.
# icon:
# position: "left"
# ^ The position of the icon relative to the widget label. Accepts: string 'left' or 'right'
# label: None
# ^ The contents of the icon. Accepts: string e.g. a unicode character / emoji. Required field.
# exec_options:
# run_cmd: "curl.exe api.openweathermap.org/data/2.5/weather?q=Glasgow&units=metric&appid={YOUR_API_KEY_HERE}"
# ^ The command to be executed by the custom widget's timer event. Accepts: string of command-line arguments.
# run_once: False
# ^ Specifies that the custom widget's timer event only run once on start-up. Accepts: boolean
# run_interval: 30000
# ^ The duration in which the custom widget's timer event will fire. Accepts: positive integer (milliseconds)
# run_format: "json"
# ^ The format of the data written to stdout by the command-line program. Accepts: strings 'string' or 'json'
# callbacks:
# on_left: "toggle_label" - toggles between the clock and alternate clock labels
# on_middle: "do_nothing"
# on_right: "do_nothing"
widgets:
active_window:
type: "yasb.active_window.ActiveWindowWidget"
options:
label: "{win[title]}"
label_alt: "[class_name='{win[class_name]}' exe='{win[process][name]}' hwnd={win[hwnd]}]"
label_no_window: ""
max_length: 48
max_length_ellipsis: "..."
monitor_exclusive: true
battery:
type: "yasb.battery.BatteryWidget"
options:
time_remaining_natural: true
clock:
type: "yasb.clock.ClockWidget"
options:
label: "{%H:%M:%S %Z}"
label_alt: "{%d-%m-%y %H:%M:%S %Z}"
timezones: ["Europe/London", "America/New_York"]
callbacks:
on_middle: "exec explorer.exe shell:Appsfolder\\Microsoft.WindowsAlarms_8wekyb3d8bbwe!App"
on_right: "next_timezone"
cpu:
type: "yasb.cpu.CpuWidget"
options:
label: "\uf200 {info[histograms][cpu_percent]}"
label_alt: "\uf200 CPU: {info[percent][total]}% | freq: {info[freq][current]:.2f} Mhz"
update_interval: 500
histogram_icons:
- '\u2581' # 0%
- '\u2581' # 10%
- '\u2582' # 20%
- '\u2583' # 30%
- '\u2584' # 40%
- '\u2585' # 50%
- '\u2586' # 60%
- '\u2587' # 70%
- '\u2588' # 80%+
histogram_num_columns: 10
memory:
type: "yasb.memory.MemoryWidget"
options:
label: "\uf538 {virtual_mem_free}"
label_alt: "\uf538 {virtual_mem_percent}%"
update_interval: 5000
callbacks:
on_right: "exec cmd /c Taskmgr"
komorebi_workspaces:
type: "komorebi.workspaces.WorkspaceWidget"
options:
label_offline: "Komorebi Offline"
label_workspace_btn: "{index}"
label_default_name: "{index}"
label_zero_index: false
hide_empty_workspaces: false
komorebi_active_layout:
type: "komorebi.active_layout.ActiveLayoutWidget"
options:
hide_if_offline: false
label: "{icon}"
layout_icons:
bsp: "[\\\\]"
columns: "[||]"
rows: "[==]"
vertical_stack: "[V]="
horizontal_stack: "[H]="
ultrawide_vertical_stack: "||="
monocle: "[M]"
maximised: "[X]"
floating: "><>"
paused: "[P]"
callbacks:
on_left: 'next_layout'
on_middle: 'toggle_monocle'
on_right: 'prev_layout'
wifi:
type: "yasb.wifi.WifiWidget"
options:
label: "{wifi_icon}"
label_alt: "{wifi_icon} {wifi_name}"
update_interval: 5000
wifi_icons:
- "\udb82\udd2e" # 0% strength (no wifi)
- "\udb82\udd1f" # 1-25% strength
- "\udb82\udd22" # 26-50% strength
- "\udb82\udd25" # 51-75% strength
- "\udb82\udd28" # 76-100% strength. Alternate theming: \uf1eb
callbacks:
on_middle: "do_nothing"
on_right: "exec cmd.exe /c start ms-settings:network"
traffic:
type: "yasb.traffic.TrafficWidget"
options:
label: "\ueb01 \ueab4 {download_speed} | \ueab7 {upload_speed}"
label_alt: "\ueb01 \ueab4 {upload_speed} | \ueab7 {download_speed}"
update_interval: 1000 # Update interval should be a multiple of 1000
callbacks:
on_right: "exec cmd /c Taskmgr"
# Some custom widgets
explorer_button:
type: "yasb.custom.CustomWidget"
options:
label: "\uf07c"
label_alt: "Explorer"
class_name: "explorer-widget"
exec_options:
run_once: true
callbacks:
on_left: "exec explorer.exe"
on_right: "toggle_label"
ip_info:
type: "yasb.custom.CustomWidget"
options:
label: "\uf3c5 {data[city]}, {data[region]}"
label_alt: "\uf3c5 {data[ip]} [{data[country]}]"
class_name: "ip-info-widget"
exec_options:
run_cmd: "curl.exe https://ipinfo.io"
run_interval: 120000 # every 5 minutes
return_format: "json"
callbacks:
on_left: "toggle_label"
on_middle: "exec cmd /c ncpa.cpl" # open network settings
on_right: "exec cmd /c start https://ipinfo.io/{data[ip]} " # open ipinfo in browser
weather:
type: "yasb.custom.CustomWidget"
options:
label: "\uf0c2 {data[current_condition][0][temp_C]}\u00b0c"
label_alt: "\uf0c2 {data[current_condition][0][weatherDesc][0][value]}"
class_name: "weather-widget"
exec_options:
run_cmd: "curl.exe wttr.in/Vancouver?format=j1"
# run every hour
run_interval: 3600000
return_format: "json"