1waybar(5) File Formats Manual waybar(5)
2
3
4
6 waybar - configuration file
7
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
18
19 A good starting point is the default configuration found at
20 https://github.com/Alexays/Waybar/blob/master/resources/config. Also a
21 minimal example configuration can be found on the at the bottom of this
22 man page.
23
25 layer
26 typeof: string
27 default: bottom
28 Decide if the bar is displayed in front (top) of the windows or
29 behind (bottom)
30 them.
31
32 output
33 typeof: string|array
34 Specifies on which screen this bar will be displayed.
35
36 position
37 typeof: string
38 default: top
39 Bar position, can be top, bottom, left, right.
40
41 height
42 typeof: integer
43 Height to be used by the bar if possible. Leave blank for a
44 dynamic value.
45
46 width
47 typeof: integer
48 Width to be used by the bar if possible. Leave blank for a dynamic
49 value.
50
51 modules-left
52 typeof: array
53 Modules that will be displayed on the left.
54
55 modules-center
56 typeof: array
57 Modules that will be displayed in the center.
58
59 modules-right
60 typeof: array
61 Modules that will be displayed on the right.
62
63 margin
64 typeof: string
65 Margins value using the CSS format without units.
66
67 margin-<top|left|bottom|right>
68 typeof: integer
69 Margins value without units.
70
71 name
72 typeof: string
73 Optional name added as a CSS class, for styling multiple waybars.
74
75 gtk-layer-shell
76 typeof: bool
77 default: true
78 Option to disable the use of gtk-layer-shell for popups.
79 Only functional if compiled with gtk-layer-shell support.
80
82 You can use PangoMarkupFormat (See https://devel‐
83 oper.gnome.org/pango/stable/PangoMarkupFormat.html#PangoMarkupFormat).
84
85 e.g.
86
87 "format": "<span style="italic">{}</span>"
88
90 If you want to have a second instance of a module, you can suffix it by
91 a '#' and a custom name. For example if you want a second battery mod‐
92 ule, you can add "battery#bat2" to your modules. To configure the
93 newly added module, you then also add a module configuration with the
94 same name.
95
96 This could then look something like this (this is an incomplete exam‐
97 ple):
98
99 "modules-right": ["battery", "battery#bat2"],
100 "battery": {
101 "bat": "BAT1"
102 },
103 "battery#bat2": {
104 "bat": "BAT2"
105 }
106
108 A minimal config file could look like this:
109
110 {
111 "layer": "top",
112 "modules-left": ["sway/workspaces", "sway/mode"],
113 "modules-center": ["sway/window"],
114 "modules-right": ["battery", "clock"],
115 "sway/window": {
116 "max-length": 50
117 },
118 "battery": {
119 "format": "{capacity}% {icon}",
120 "format-icons": ["", "", "", "", ""]
121 },
122 "clock": {
123 "format-alt": "{:%a, %d. %b %H:%M}"
124 }
125 }
126
128 Limit a configuration to some outputs
129 {
130 "layer": "top",
131 "output": "eDP-1",
132 "modules-left": ["sway/workspaces", "sway/mode"],
133 ...
134
135 }
136
137
138 {
139 "layer": "top",
140 "output": ["eDP-1", "VGA"],
141 "modules-left": ["sway/workspaces", "sway/mode"],
142 ...
143 }
144
145
146 Configuration of multiple outputs
147 Don't specify an output to create multiple bars on the same screen.
148
149 [{
150 "layer": "top",
151 "output": "eDP-1",
152 "modules-left": ["sway/workspaces", "sway/mode"],
153 ...
154 }, {
155 "layer": "top",
156 "output": "VGA",
157 "modules-right": ["clock"],
158 ...
159 }]
160
161
162 Rotating modules
163 When positioning Waybar on the left or right side of the screen, some‐
164 times it's useful to be able to rotate the contents of a module so the
165 text runs vertically. This can be done using the "rotate" property of
166 the module. Example:
167
168 {
169 "clock": {
170 "rotate": 90
171 }
172 }
173
174 Valid options for the "rotate" property are: 0, 90, 180 and 270.
175
177 · waybar-backlight(5)
178 · waybar-battery(5)
179 · waybar-clock(5)
180 · waybar-cpu(5)
181 · waybar-custom(5)
182 · waybar-idle-inhibitor(5)
183 · waybar-memory(5)
184 · waybar-mdp(5)
185 · waybar-network(5)
186 · waybar-pulseaudio(5)
187 · waybar-sway-mode(5)
188 · waybar-sway-window(5)
189 · waybar-sway-workspaces(5)
190 · waybar-temperature(5)
191 · waybar-tray(5)
192
193
194
195 2020-04-11 waybar(5)