1SWAY-BAR(5)                                                        SWAY-BAR(5)
2
3
4

NAME

6       sway-bar - bar configuration file and commands
7

DESCRIPTION

9       Sway allows configuring swaybar in the sway configuration file. Swaybar
10       commands must be used inside a bar { } block in the config file.
11

COMMANDS

13       status_command <status command>
14           Executes the bar status command with sh -c. Each line of text
15           printed to stdout from this command will be displayed in the status
16           area of the bar. You may also use the i3bar JSON protocol:
17
18           https://i3wm.org/docs/i3bar-protocol.html
19
20       pango_markup <enabled|disabled>
21           Enables or disables pango markup for status lines. This has no
22           effect on status lines using the i3bar JSON protocol.
23
24       id <bar_id>
25           Sets the ID of the bar.
26
27       position <top|bottom>
28           Sets position of the bar. Default is bottom.
29
30       output <output>
31           Restrict the bar to a certain output, can be specified multiple
32           times. If the output command is omitted, the bar will be displayed
33           on all outputs.
34
35       swaybar_command <command>
36           Executes custom bar command, default is swaybar.
37
38       font <font>
39           Specifies the font to be used in the bar.
40
41       separator_symbol <symbol>
42           Specifies the separator symbol to separate blocks on the bar.
43
44       wrap_scroll <yes|no>
45           Enables or disables wrapping when scrolling through workspaces with
46           the scroll wheel. Default is no.
47
48       workspace_buttons <yes|no>
49           Enables or disables workspace buttons on the bar. Default is yes.
50
51       strip_workspace_numbers <yes|no>
52           If set to yes, then workspace numbers will be omitted from the
53           workspace button and only the custom name will be shown. Default is
54           no.
55
56       binding_mode_indicator <yes|no>
57           Enable or disable binding mode indicator. Default is yes.
58
59       height <height>
60           Sets the height of the bar. Default height will match the font
61           size.
62

TRAY

64       Swaybar provides a system tray where programs such as NetworkManager,
65       VLC, Pidgin, etc. can place little icons. The following commands
66       configure interaction with the tray or individual icons. The button
67       argument in all following commands is a Linux input event code as
68       defined in linux/input-event-codes.h. This is because wayland defines
69       button codes in this manner.
70
71       activate_button <button>
72           Sets the button to be used for the activate (primary click) tray
73           item event. The default is BTN_LEFT (0x110).
74
75       context_button <button>
76           Sets the button to be used for the context menu (right click) tray
77           item event. The default is BTN_RIGHT (0x111).
78
79       secondary_button <button>
80           Sets the button to be used for the secondary (middle click) tray
81           item event. The default is BTN_MIDDLE (0x112).
82
83       tray_output none|all|<name>
84           Sets the output that the tray will appear on or none. Unlike i3bar,
85           swaybar should be able to show icons on any number of bars and
86           outputs without races. Because of this, the default value for this
87           is all.
88
89       tray_padding <px> [px]
90           Sets the pixel padding of the system tray. This padding will
91           surround the tray on all sides and between each item. The default
92           value for px is 2.
93
94       icon_theme <name>
95           Sets the icon theme that sway will look for item icons in. This
96           option has no default value, because sway will always default to
97           the fallback theme, hicolor.
98

COLORS

100       Colors are defined within a colors { } block inside a bar { } block.
101       Colors must be defined in hex. i.e. #rrggbb or #rrggbbaa when including
102       the alpha channel.
103
104       background <color>
105           Background color of the bar.
106
107       statusline <color>
108           Text color to be used for the statusline.
109
110       separator <color>
111           Text color to be used for the separator.
112
113       focused_background <color>
114           Background color of the bar on the currently focused monitor
115           output. If not used, the color will be taken from background.
116
117       focused_statusline <color>
118           Text color to be used for the statusline on the currently focused
119           monitor output. If not used, the color will be taken from
120           statusline.
121
122       focused_separator <color>
123           Text color to be used for the separator on the currently focused
124           monitor output. If not used, the color will be taken from
125           separator.
126
127       focused_workspace <border> <background> <text>
128           Border, background and text color for a workspace button when the
129           workspace has focus.
130
131       active_workspace <border> <background> <text>
132           Border, background and text color for a workspace button when the
133           workspace is active (visible) on some output, but the focus is on
134           another one. You can only tell this apart from the focused
135           workspace when you are using multiple monitors.
136
137       inactive_workspace <border> <background> <text>
138           Border, background and text color for a workspace button when the
139           workspace does not have focus and is not active (visible) on any
140           output. This will be the case for most workspaces.
141
142       urgent_workspace <border> <background> <text>
143           Border, background and text color for a workspace button when the
144           workspace contains a window with the urgency hint set.
145
146       binding_mode <border> <background> <text>
147           Border, background and text color for the binding mode indicator.
148           If not used, the colors will be taken from urgent_workspace.
149

SEE ALSO

151       sway(5)
152
153
154
155                                  02/07/2019                       SWAY-BAR(5)
Impressum