![]() |
![]()
| ![]() |
![]()
NAMEwaybar - configuration file DESCRIPTIONThe configuration uses the JSONC file format and is named config or config.jsonc. Valid locations for this file are:
A good starting point is the default configuration found at https://github.com/Alexays/Waybar/blob/master/resources/config.jsonc Also, a minimal example configuration can be found at the bottom of this man page. The visual display elements for waybar use a CSS stylesheet, see waybar-styles(5) for details. BAR CONFIGURATIONexpand-center
expand-left
expand-right
layer
them.
output
Output specification follows sway's and can either be the
output port such as "HDMI-A-1" or a string consisting of the make,
model, and serial such as "Some Company ABC123 0x00000000". See
sway-output(5) for details. In an array, star '*' can be used at
the end to accept all outputs, in case all previous entries are
exclusions.
position
height
width
modules-left
modules-center
modules-right
Modules that will be displayed on the right.
margin
margin-<top|left|bottom|right>
no-center
spacing
name
mode
start_hidden
modifier-reset
Defines the timing of modifier key to reset the bar
visibility. To reset the visibility of the bar with the press of the modifier
key use press. Use release to reset the visibility upon the
release of the modifier key and only if no other action happened while the key
was pressed. This prevents hiding the bar when the modifier is used to switch
a workspace, change binding mode, or start a keybinding.
exclusive
fixed-center
Prefer fixed center position for the `modules-center`
block. The center block will stay in the middle of the bar whenever possible.
It can still be pushed around if other blocks need more space. When false, the
center block is centered in the space between the left and right block.
passthrough
Intended to be used with either top or
overlay layers and without exclusive zone.
ipc
id
include
Each file can contain a single object with any of the bar
configuration options. In case of duplicate options, the first defined value
takes precedence, i.e. including file -> first included file -> etc.
Nested includes are permitted, but make sure to avoid circular imports. For a
multi-bar config, the include directive affects only current bar configuration
object.
reload_style_on_change
MODULE FORMATYou can use PangoMarkupFormat (See https://developer.gnome.org/pango/stable/PangoMarkupFormat.html#PangoMarkupFormat). e.g. "format": "<span style="italic">{}</span>" MULTIPLE INSTANCES OF A MODULEIf you want to have a second instance of a module, you can suffix it by a '#' and a custom name. For example, if you want a second battery module, you can add "battery#bat2" to your modules. To configure the newly added module, you then also add a module configuration with the same name. This could then look something like this (this is an incomplete example): "modules-right": ["battery", "battery#bat2"], "battery": { "bat": "BAT1" }, "battery#bat2": { "bat": "BAT2" } MINIMAL CONFIGURATIONA minimal config file could look like this: { "layer": "top", "modules-left": ["sway/workspaces", "sway/mode"], "modules-center": ["sway/window"], "modules-right": ["battery", "clock"], "sway/window": { "max-length": 50 }, "battery": { "format": "{capacity}% {icon}", "format-icons": ["", "", "", "", ""] }, "clock": { "format-alt": "{:%a, %d. %b %H:%M}" } } SIGNALSWaybar accepts the following signals: SIGUSR1 Toggles the bar visibility (hides if shown, shows if
hidden)
SIGUSR2
Reloads (resets) the bar
SIGINT
Quits the bar
For example, to toggle the bar programmatically, you can invoke `killall -SIGUSR1 waybar`. MULTI OUTPUT CONFIGURATIONLimit a configuration to some outputs{ "layer": "top", "output": "eDP-1", "modules-left": ["sway/workspaces", "sway/mode"], ... } { "layer": "top", "output": ["eDP-1", "VGA"], "modules-left": ["sway/workspaces", "sway/mode"], ... } Configuration of multiple outputsDon't specify an output to create multiple bars on the same screen. [{ "layer": "top", "output": "eDP-1", "modules-left": ["sway/workspaces", "sway/mode"], ... }, { "layer": "top", "output": "VGA", "modules-right": ["clock"], ... }] Rotating modulesWhen positioning Waybar on the left or right side of the screen, sometimes it's useful to be able to rotate the contents of a module so the text runs vertically. This can be done using the "rotate" property of the module. Example: { "clock": { "rotate": 90 } } Valid options for the "rotate" property are: 0, 90, 180, and 270. Swapping icon and labelIf a module displays both a label and an icon, it might be desirable to swap them (for instance, for panels on the left or right of the screen, or for user adopting a right-to-left script). This can be achieved with the "swap-icon-label" property, taking a boolean. Example: { "sway/window": { "swap-icon-label": true } } Grouping modulesModule groups allow stacking modules in any direction. By default, when the bar is positioned on the top or bottom of the screen, modules in a group are stacked vertically. Likewise, when positioned on the left or right, modules in a group are stacked horizontally. This can be changed with the "orientation" property. A module group is defined by specifying a module named "group/some-group-name". The group must also be configured with a list of contained modules. Example: { "modules-right": ["group/hardware", "clock"], "group/hardware": { "orientation": "vertical", "modules": [ "cpu", "memory", "battery" ] }, ... } Valid options for the (optional) "orientation" property are: "horizontal", "vertical", "inherit", and "orthogonal" (default). Group DrawersA group may hide all but one element, showing them only on mouse hover. In order to configure this, you can use the `drawer` property, whose value is an object with the following properties: transition-duration:
children-class:
click-to-reveal:
transition-left-to-right:
When the bar is vertical, it reads as
top-to-bottom.
"group/power": { SUPPORTED MODULES
SEE ALSOsway-output(5) waybar-styles(5)"
|