1waybar(5)                     File Formats Manual                    waybar(5)
2
3
4

NAME

6       waybar - configuration file
7

DESCRIPTION

9       The configuration uses the JSON file format and is named config.
10
11       Valid locations for this file are:
12
13       ·   $XDG_CONFIG_HOME/waybar/config
14       ·   ~/.config/waybar/config
15       ·   ~/waybar/config
16       ·   /etc/xdg/waybar/config
17       ·   /etc/xdg/waybar/config
18
19
20       A good starting point is the default configuration found at
21       https://github.com/Alexays/Waybar/blob/master/resources/config Also a
22       minimal example configuration can be found on the at the bottom of this
23       man page.
24

BAR CONFIGURATION

26       layer
27            typeof: string
28            default: bottom
29            Decide if the bar is displayed in front (top) of the windows or
30       behind (bottom)
31           them.
32
33       output
34            typeof: string|array
35            Specifies on which screen this bar will be displayed. Exclamation
36       mark(!) can be used to exclude specific output.
37
38       position
39            typeof: string
40            default: top
41            Bar position, can be top, bottom, left, right.
42
43       height
44            typeof: integer
45            Height to be used by the bar if possible. Leave blank for a
46       dynamic value.
47
48       width
49            typeof: integer
50            Width to be used by the bar if possible. Leave blank for a dynamic
51       value.
52
53       modules-left
54            typeof: array
55            Modules that will be displayed on the left.
56
57       modules-center
58            typeof: array
59            Modules that will be displayed in the center.
60
61       modules-right
62            typeof: array
63           Modules that will be displayed on the right.
64
65       margin
66            typeof: string
67            Margins value using the CSS format without units.
68
69       margin-<top|left|bottom|right>
70            typeof: integer
71            Margins value without units.
72
73       name
74            typeof: string
75            Optional name added as a CSS class, for styling multiple waybars.
76
77       gtk-layer-shell
78            typeof: bool
79            default: true
80            Option to disable the use of gtk-layer-shell for popups.
81           Only functional if compiled with gtk-layer-shell support.
82

MODULE FORMAT

84       You can use PangoMarkupFormat (See https://devel
85       oper.gnome.org/pango/stable/PangoMarkupFormat.html#PangoMarkupFormat).
86
87       e.g.
88
89           "format": "<span style="italic">{}</span>"
90

MULTIPLE INSTANCES OF A MODULE

92       If you want to have a second instance of a module, you can suffix it by
93       a '#' and a custom name. For example if you want a second battery mod‐
94       ule, you can add "battery#bat2" to your modules. To configure the newly
95       added module, you then also add a module configuration with the same
96       name.
97
98       This could then look something like this (this is an incomplete exam‐
99       ple):
100
101           "modules-right": ["battery", "battery#bat2"],
102           "battery": {
103                "bat": "BAT1"
104           },
105           "battery#bat2": {
106                "bat": "BAT2"
107           }
108

MINIMAL CONFIGURATION

110       A minimal config file could look like this:
111
112           {
113                "layer": "top",
114                "modules-left": ["sway/workspaces", "sway/mode"],
115                "modules-center": ["sway/window"],
116                "modules-right": ["battery", "clock"],
117                "sway/window": {
118                     "max-length": 50
119                },
120                "battery": {
121                     "format": "{capacity}% {icon}",
122                     "format-icons": ["", "", "", "", ""]
123                },
124                "clock": {
125                     "format-alt": "{:%a, %d. %b  %H:%M}"
126                }
127           }
128

MULTI OUTPUT CONFIGURATION

130   Limit a configuration to some outputs
131           {
132                "layer": "top",
133                "output": "eDP-1",
134                "modules-left": ["sway/workspaces", "sway/mode"],
135                ...
136
137           }
138
139
140           {
141                "layer": "top",
142                "output": ["eDP-1", "VGA"],
143                "modules-left": ["sway/workspaces", "sway/mode"],
144                ...
145           }
146
147
148   Configuration of multiple outputs
149       Don't specify an output to create multiple bars on the same screen.
150
151           [{
152                "layer": "top",
153                "output": "eDP-1",
154                "modules-left": ["sway/workspaces", "sway/mode"],
155                ...
156           }, {
157                "layer": "top",
158                "output": "VGA",
159                "modules-right": ["clock"],
160                ...
161           }]
162
163
164   Rotating modules
165       When positioning Waybar on the left or right side of the screen, some‐
166       times it's useful to be able to rotate the contents of a module so the
167       text runs vertically. This can be done using the "rotate" property of
168       the module. Example:
169
170           {
171                "clock": {
172                     "rotate": 90
173                }
174           }
175
176       Valid options for the "rotate" property are: 0, 90, 180 and 270.
177

SUPPORTED MODULES

179       ·   waybar-backlight(5)
180       ·   waybar-battery(5)
181       ·   waybar-bluetooth(5)
182       ·   waybar-clock(5)
183       ·   waybar-cpu(5)
184       ·   waybar-custom(5)
185       ·   waybar-disk(5)
186       ·   waybar-idle-inhibitor(5)
187       ·   waybar-memory(5)
188       ·   waybar-mpd(5)
189       ·   waybar-network(5)
190       ·   waybar-pulseaudio(5)
191       ·   waybar-river-tags(5)
192       ·   waybar-states(5)
193       ·   waybar-sway-mode(5)
194       ·   waybar-sway-window(5)
195       ·   waybar-sway-workspaces(5)
196       ·   waybar-wlr-taskbar(5)
197       ·   waybar-temperature(5)
198       ·   waybar-tray(5)
199
200
201
202                                  2021-02-10                         waybar(5)
Impressum