Config file#
The configuration uses the YAML file format and is named config or config.yaml.
Valid directories for this file are C:/Users/{username}/.config/yasb/ or ENV variable YASB_CONFIG_HOME if set.
All valid options for the widgets are listed on the widgets page.
Environment Variables Support#
YASB supports loading environment variables from a .env file.
This allows you to securely store sensitive information (such as API keys or tokens) outside of your main config.yaml.
-
The
.envfile should be placed in your config directory:
C:/Users/{username}/.config/yasb/.env
or in the directory specified by theYASB_CONFIG_HOMEenvironment variable. -
Variables defined in
.envcan be referenced in yourconfig.yamlby setting the value toenv(for example,api_key: envorapi_key: "$env:YASB_WEATHER_API_KEY"). - The
.envfile is loaded automatically on startup.
Example .env file:
YASB_WEATHER_API_KEY=your_api_key_here
YASB_GITHUB_TOKEN=your_github_token_here
YASB_WEATHER_LOCATION=your_location_here
# Some Qt settings
QT_SCREEN_SCALE_FACTORS="1.25;1"
QT_SCALE_FACTOR_ROUNDING_POLICY="PassThrough"
YASB Font Engine#
YASB supports different font engines to improve text rendering quality.
You can set the font engine by defining the YASB_FONT_ENGINE environment variable in your .env file or in OS environment variables.
Valid options are:
native: Uses the DirectWrite font rendering engine.gdi: Uses the GDI font rendering engine.freetype: Uses the FreeType font rendering engine.
Note
The default font engine is GDI, changing the font engine may cause different font rendering quality. You can experiment with different engines to see which one works best for you. Font names can be different between engines, example: gdi "font-family: 'JetBrainsMono NFP';" may need to be changed to "font-family: 'JetBrainsMono Nerd Font Propo'" for DirectWrite.
Status Bar Root Configuration#
| Option | Type | Default | Description |
|---|---|---|---|
watch_stylesheet |
boolean | true |
Reload bar when style is changed. |
watch_config |
boolean | true |
Reload bar when config is changed. |
debug |
boolean | false |
Enable debug mode to see more logs |
update_check |
boolean | true |
Enable automatic update check. This works only if the application is installed. |
show_systray |
boolean | true |
Show or hide the YASB system tray icon. |
system_colors |
boolean | false |
Enable automatic generation of CSS variables from Windows theme colors. |
tooltip |
object | See below | Global tooltip configuration. |
komorebi |
object | See below | Komorebi configuration for tray menu. |
glazewm |
object | See below | Glazewm configuration for tray menu. |
Logging and Debugging#
YASB provides detailed logging to help troubleshoot widget or configuration issues.
- Enable Debug Mode: Set
debug: truein your root configuration to output verbose logs. - View Logs via CLI: Run
yasbc login your terminal to stream real-time logs. - View Log File: Check the
yasb.logfile located in your config directory (default:C:/Users/{username}/.config/yasb/).
Tooltip Configuration#
Global configuration for tooltips and their blur effects.
| Option | Type | Default | Description |
|---|---|---|---|
offset |
integer | 5 |
The distance in pixels between the tooltip and the hovered item or bar. |
blur_effect |
object | See below | Global tooltip blur configuration. |
Tooltip Blur Effect Configuration#
| Option | Type | Default | Description |
|---|---|---|---|
enabled |
boolean | false |
Whether the blur effect is enabled for tooltips. |
dark_mode |
boolean | false |
Whether to enable dark mode for the tooltip blur. |
round_corners |
boolean | false |
Whether to enable rounded corners for the tooltips. Note: This is only effective on Windows 11. |
round_corners_type |
string | 'normal' |
The type of rounded corners, can be normal or small. Note: This is only effective on Windows 11. |
border_color |
string | 'None' |
The border color for the tooltip, can be None, "system", or a hex color (e.g., "#ff0000"). Note: This is only effective on Windows 11. |
Note
Rounded corners, border color and rounded corners type are only effective on Windows 11.
Example Configuration:
tooltip:
offset: 5
blur_effect:
enabled: true
dark_mode: false
round_corners: true
round_corners_type: "small"
border_color: "None"
Komorebi settings for tray menu#
Adds a Komorebi submenu to the YASB tray icon menu. None of the commands are set by default. The submenu is shown only when Komorebi is installed and at least one command is set, and it only lists the actions you set a command for.
| Option | Type | Default | Description |
|---|---|---|---|
start_command |
string | None |
Command that starts Komorebi. |
stop_command |
string | None |
Command that stops Komorebi. |
reload_command |
string | None |
Command that reloads the Komorebi configuration. |
Example Configuration:
komorebi:
start_command: "komorebic start --whkd"
stop_command: "komorebic stop --whkd"
reload_command: "komorebic reload-configuration"
Glazewm settings for tray menu#
Adds a GlazeWM submenu to the YASB tray icon menu. None of the commands are set by default. The submenu is shown only when GlazeWM is installed and at least one command is set, and it only lists the actions you set a command for.
| Option | Type | Default | Description |
|---|---|---|---|
start_command |
string | None |
Command that starts GlazeWM. |
stop_command |
string | None |
Command that stops GlazeWM. |
reload_command |
string | None |
Command that reloads the GlazeWM configuration. |
Example Configuration:
glazewm:
start_command: "glazewm.exe start"
stop_command: "glazewm.exe command wm-exit"
reload_command: "glazewm.exe command wm-exit && glazewm.exe start"
Status Bar Configuration#
| Option | Type | Default | Description |
|---|---|---|---|
enabled |
boolean | true |
Whether the status bar is enabled. |
screens |
list | ['*'] |
The screens on which the status bar should be displayed. Use ['*'] for all unassigned screens, ['**'] for all screens (including assigned), or specify screen names like ['DELL P2419H (1)']. |
class_name |
string | "yasb-bar" |
The CSS class name for the status bar. |
style |
string | "bar" |
The visual style of the status bar. Can be "bar" or "adaptive". See below |
style_adaptive_exclude |
list | [] |
Widgets the "adaptive" style leaves outside its painted surface. See below |
context_menu |
boolean | true |
Whether to enable the right-click context menu on the status bar. |
alignment |
object | See below | The alignment settings for the status bar. |
blur_effect |
object | See below | The blur effect settings for the status bar. |
window_flags |
object | See below | The window flags for the status bar. |
dimensions |
object | {width: "100%", height: 30} |
The dimensions of the status bar. Width can be a number (pixels), percentage string (e.g., "100%", "50%"), or "auto" to resize based on content. When using "auto", the bar will automatically resize as widget content changes, with a maximum width of the available screen width minus padding. |
padding |
object | {top: 0, left: 0, bottom: 0, right: 0} |
The padding for the status bar. |
animation |
object | {enabled: true, duration: 500} |
The animation settings for the status bar. Duration is in milliseconds. Animation is used to show/hide the bar smoothly. |
widgets |
list | left[], center[], right[] |
Active widgets and position. |
layouts |
object | See below | Configuration for widget layouts in each section (left, center, right). |
Note
Setting the width to "auto" is not recommended for widgets that constantly update data, such as CPU, memory, clock, etc. This can cause the bar to constantly resize, which may lead to flickering or performance issues.
Note
screens can be specified as a list of monitor names. If you want the bar to appear on all screens, use ['*']. To specify a single screen, use ['DELL P2419H (1)'] or a similar name based on your monitor setup. To show the bar only and always on the primary screen, use ['primary'].
Bar Style#
| Option | Description |
|---|---|
"bar" |
The default. The bar is a solid rectangle filled by the background-color of .yasb-bar. |
"adaptive" |
The bar surface follows its content. A thin rail is painted along the outer edge across the full width, and each widget group (left, center and right) drops to the full bar height as its own island hugging its widgets. The space between islands is transparent, so the wallpaper shows through. The outermost islands sit flush against the edges of the bar. Islands can be turned off from the stylesheet for a plain full-width bar, optionally with just its outer corners curved. |
bars:
primary-bar:
style: "adaptive"
The rail height, corner radius, the padding around each group, and whether islands are drawn at all are set from the stylesheet so they reload with your theme. See Adaptive bar style for the available properties.
Note
Islands need gaps to cut out, so with islands on this needs a bar wide enough to leave space
between the widget groups. A bar with dimensions.width: "auto", or one whose widgets fill the
full width, is painted as a normal rectangle either way.
style_adaptive_exclude lists widgets the island shape does not paint under. The island stops
before the widget and starts again after it, so a widget in the middle of a group splits it into
two islands. It has nothing to do if islands are turned off from the stylesheet, there is only
one surface left to exclude a widget from.
bars:
primary-bar:
style: "adaptive"
style_adaptive_exclude: ["systray", "weather"]
Names come from your widgets section. The widget draws as usual, only the surface under it is
gone. Widgets inside a Grouper cannot be named on their own, excluding the grouper leaves the whole
group out.
Bar Alignment#
| Option | Type | Default | Description |
|---|---|---|---|
position |
string | "top" |
The position of the status bar, can be "top" or "bottom" |
align |
string | "center" |
The alignment of the status bar, can be "left", "center", or "right" |
Animation Configuration#
Customize how the status bar transitions when shown or hidden:
| Option | Type | Default | Description |
|---|---|---|---|
enabled |
boolean | true |
Whether to animate the bar when showing or hiding it. |
duration |
integer | 500 |
The animation duration in milliseconds. |
type |
string | "slide" |
The style of animation to play. Can be "slide" (slides from the screen edge) or "fade" (fades in/out). |
Blur Effect Configuration#
| Option | Type | Default | Description |
|---|---|---|---|
enabled |
boolean | false |
Whether the blur effect is enabled. |
dark_mode |
boolean | false |
Whether to enable dark mode and more shadow below the bar. |
round_corners |
boolean | false |
Whether to enable rounded corners for the bar. Note: This is only effective on Windows 11. |
round_corners_type |
string | 'normal' |
The type of rounded corners, can be normal or small. Note: This is only effective on Windows 11. |
border_color |
string | 'system' |
The border color for the bar, can be None, "system", or a hex color (e.g., "#ff0000"). Note: This is only effective on Windows 11. |
Note
Rounded corners, border color and rounded corners type are only effective on Windows 11.
Window Flags Configuration#
| Option | Type | Default | Description |
|---|---|---|---|
always_on_top |
boolean | false |
Whether the status bar should always stay on top of other windows. |
windows_app_bar |
boolean | false |
Whether the status bar should behave like a Windows app bar. |
hide_on_fullscreen |
boolean | false |
Whether the status bar should hide when a window is in fullscreen mode. |
hide_on_maximized |
boolean | false |
Whether the status bar should auto-hide when any window is maximized on the bar's monitor. Only works when windows_app_bar is false. |
auto_hide |
boolean | false |
Whether the status bar should auto-hide when not in use. |
Layouts Configuration#
Each section (left, center, right) can be configured with the following properties:
| Option | Type | Default | Description |
|---|---|---|---|
alignment |
string | Section-dependent | Widget alignment within section ("left", "center", "right") |
stretch |
boolean | true |
Whether widgets should stretch to fill available space |
Example:
layouts:
left:
alignment: "left"
stretch: true
center:
alignment: "center"
stretch: true
right:
alignment: "right"
stretch: true
Multiple Bars Example#
Note
If you want to have different bars on each screen you will need to define on which screen the bar should be displayed, screens inside bar config is your monitor name. You can find your monitor names using yasbc monitor-information or inside device manager.
Screen Assignment Options#
screens: ['*']- Show on all unassigned screens (screens not explicitly assigned to other bars)screens: ['**']- Show on all screens (including screens assigned to other bars)screens: ['SCREEN_NAME']- Show on specific screen(s)
bars:
status-bar:
screens: ['DELL P2419H (1)'] # Show only on monitor 1
widgets:
left: ["clock"]
center: ["cpu"]
right: ["memory"]
status-bar-2:
screens: ['DELL P2419H (2)'] # Show only on monitor 2
widgets:
left: ["active_window"]
center: ["media"]
right: ["volume","power_menu"]
status-bar-3:
screens: ['*'] # Show on all unassigned screens
widgets:
center: ["weather"]
global-taskbar:
screens: ['**'] # Show on ALL screens (including monitors 1 and 2)
widgets:
left: ["taskbar"]
widgets:
...