2019-08-20 20:51:53 +02:00
waybar(5)
# NAME
waybar - configuration file
# DESCRIPTION
2019-08-24 19:11:03 +02:00
The configuration uses the JSON file format and is named *config*.
2019-08-20 20:51:53 +02:00
2019-08-26 23:33:10 +02:00
Valid locations for this file are:
2019-08-20 20:51:53 +02:00
2019-08-26 23:33:10 +02:00
- *~/.config/waybar/config*
- *~/waybar/config*
- */etc/xdg/waybar/config*
2019-08-20 20:51:53 +02:00
2019-08-26 23:27:03 +02:00
A good starting point is the default configuration found at https://github.com/Alexays/Waybar/blob/master/resources/config.
Also a minimal example configuration can be found on the at the bottom of this man page.
2019-08-20 20:51:53 +02:00
2019-08-26 23:27:03 +02:00
# BAR CONFIGURATION
2019-08-20 20:51:53 +02:00
2019-08-24 18:19:32 +02:00
*layer* ++
typeof: string ++
default: bottom ++
Decide if the bar is displayed in front of the windows or behind them.
*output* ++
typeof: string|array ++
Specifies on which screen this bar will be displayed.
*position* ++
typeof: string ++
default: top ++
2019-08-26 23:30:18 +02:00
Bar position, can be *top*, *bottom*, *left*, *right*.
2019-08-24 18:19:32 +02:00
*height* ++
typeof: integer ++
2019-08-26 23:33:10 +02:00
Height to be used by the bar if possible. Leave blank for a dynamic value.
2019-08-24 18:19:32 +02:00
*width* ++
typeof: integer ++
2019-08-26 23:33:10 +02:00
Width to be used by the bar if possible. Leave blank for a dynamic value.
2019-08-24 18:19:32 +02:00
*modules-left* ++
typeof: array ++
Modules that will be displayed on the left.
*modules-center* ++
typeof: array ++
Modules that will be displayed in the center.
*modules-right* ++
typeof: array
Modules that will be displayed on the right.
*margin* ++
typeof: string ++
2019-08-26 23:33:10 +02:00
Margins value using the CSS format without units.
2019-08-24 18:19:32 +02:00
*margin-<top\|left\|bottom\|right>* ++
typeof: integer ++
Margins value without units.
*name* ++
typeof: string ++
Optional name added as a CSS class, for styling multiple waybars.
2019-08-26 19:20:22 +02:00
# MODULE FORMAT
2019-08-20 20:51:53 +02:00
You can use PangoMarkupFormat (See https://developer.gnome.org/pango/stable/PangoMarkupFormat.html#PangoMarkupFormat).
e.g.
```
"format": "<span style=\"italic\">{}</span>"
```
2019-08-24 22:46:56 +02:00
# MULTIPLE INSTANCES OF A MODULE
2019-08-20 20:51:53 +02:00
If you want to have a second instance of a module, you can suffix it by a '#' and a custom name.
2019-08-26 23:30:18 +02:00
For example if you want a second battery module, you can add *"battery#bat2"* to your modules.
2019-08-20 20:51:53 +02:00
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": {
2019-08-24 19:11:03 +02:00
"bat": "BAT1"
2019-08-20 20:51:53 +02:00
},
"battery#bat2": {
2019-08-24 19:11:03 +02:00
"bat": "BAT2"
2019-08-20 20:51:53 +02:00
}
```
2019-08-26 23:27:03 +02:00
# MINIMAL CONFIGURATION
2019-08-20 20:51:53 +02:00
2019-08-24 19:11:03 +02:00
A minimal *config* file could look like this:
2019-08-20 20:51:53 +02:00
```
{
2019-08-24 19:11:03 +02:00
"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}"
}
2019-08-20 20:51:53 +02:00
}
```
2019-08-26 23:27:03 +02:00
# MULTI OUTPUT CONFIGURATION
2019-08-20 20:51:53 +02:00
2019-08-24 19:11:03 +02:00
## Limit a configuration to some outputs
2019-08-20 20:51:53 +02:00
```
{
2019-08-24 19:11:03 +02:00
"layer": "top",
2019-08-20 20:51:53 +02:00
"output": "eDP-1",
2019-08-24 19:11:03 +02:00
"modules-left": ["sway/workspaces", "sway/mode"],
2019-08-20 20:51:53 +02:00
...
}
```
```
{
2019-08-24 19:11:03 +02:00
"layer": "top",
2019-08-20 20:51:53 +02:00
"output": ["eDP-1", "VGA"],
2019-08-24 19:11:03 +02:00
"modules-left": ["sway/workspaces", "sway/mode"],
2019-08-20 20:51:53 +02:00
...
}
```
2019-08-24 19:11:03 +02:00
## Configuration of multiple outputs
2019-08-20 20:51:53 +02:00
2019-08-24 19:11:03 +02:00
Don't specify an output to create multiple bars on the same screen.
2019-08-20 20:51:53 +02:00
```
[{
2019-08-24 19:11:03 +02:00
"layer": "top",
2019-08-20 20:51:53 +02:00
"output": "eDP-1",
2019-08-24 19:11:03 +02:00
"modules-left": ["sway/workspaces", "sway/mode"],
2019-08-20 20:51:53 +02:00
...
}, {
"layer": "top",
"output": "VGA",
2019-08-24 19:11:03 +02:00
"modules-right": ["clock"],
2019-08-20 20:51:53 +02:00
...
}]
```
2019-08-24 19:11:03 +02:00
## Rotating modules
2019-08-20 20:51:53 +02:00
When 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:
```
{
2019-08-24 19:11:03 +02:00
"clock": {
"rotate": 90
}
2019-08-20 20:51:53 +02:00
}
```
Valid options for the "rotate" property are: 0, 90, 180 and 270.
2019-08-26 19:20:22 +02:00
# SUPPORTED MODULES
- *waybar-backlight(5)*
- *waybar-battery(5)*
- *waybar-clock(5)*
- *waybar-cpu(5)*
- *waybar-custom(5)*
- *waybar-idle-inhibitor(5)*
- *waybar-memory(5)*
- *waybar-mdp(5)*
- *waybar-network(5)*
- *waybar-pulseaudio(5)*
- *waybar-sway-mode(5)*
- *waybar-sway-window(5)*
- *waybar-sway-workspaces(5)*
- *waybar-temperature(5)*
- *waybar-tray(5)*