1POLYBAR(5)                    Polybar User Manual                   POLYBAR(5)
2
3
4

NAME

6       polybar - configuration file for polybar(1)
7

DESCRIPTION

9       The  polybar  configuration file defines the behavior and look of poly‐
10       bar. It uses a variant of the INI file format.  The exact syntax is de‐
11       scribed  below  but first a small snippet to get familiar with the syn‐
12       tax:
13
14          [section_name]
15          ; A comment
16          # Another comment
17
18          background = #ff992a
19          width = 90%
20          monitor = HDMI-0
21
22          screenchange-reload = false
23
24          ; Use double quotes if you want to keep the surrounding space.
25          text = " Some text "
26
27       When started polybar will search for the config file in one of  several
28       places in the following order:
29
30       • If the -c or --config command line argument is specified, it will use
31         the path given there.
32
33$XDG_CONFIG_HOME/polybar/config
34
35$XDG_CONFIG_HOME/polybar/config.ini
36
37$HOME/.config/polybar/config
38
39$HOME/.config/polybar/config.ini
40
41$XDG_CONFIG_DIRS/polybar/config.ini
42
43/etc/xdg/polybar/config.ini (only if XDG_CONFIG_DIRS is not set)
44
45/etc/polybar/config.ini
46

SYNTAX

48       The entire config is line-based so everything is constrained to a  sin‐
49       gle  line.  This means there are no multiline values or other multiline
50       constructs (except for sections).  Each line has one of four types:
51
52       • Empty
53
54       • Comment
55
56       • Section Header
57
58       • Key
59
60       Spaces at the beginning and end of each line will be ignored.
61
62       NOTE:
63          In this context "spaces" include the regular space character as well
64          as  the  tab  character and any other character for which isspace(3)
65          returns true (e.g. \r).
66
67       Any line that doesn't fit into one of these four types is a syntax  er‐
68       ror.
69
70       NOTE:
71          It  is  recommended that section header names and key names only use
72          alphanumeric characters as well as dashes (-), underscores  (_)  and
73          forward slashes (/).
74
75          In  practice all characters are allowed except for spaces and any of
76          these: "'=;#[](){}:.$\%
77
78   Section Headers
79       Sections are used to group config options together.  For  example  each
80       module is defined in its own section.
81
82       A  section  is  defined  by  placing  the name of the section in square
83       brackets ([ and ]). For example:
84
85          [module/wm]
86
87       This declares a section with the name module/wm and  all  keys  defined
88       after  this line will belong to that section until a new section is de‐
89       clared.
90
91       WARNING:
92          The first non-empty and non-comment line in  the  main  config  file
93          must  be a section header. It cannot be a key because that key would
94          not belong to any section.
95
96       NOTE:
97          The following section names are reserved and cannot be  used  inside
98          the config: self, root, and BAR.
99
100   Keys
101       Keys are defined by assigning a value to a name like this:
102
103          name = value
104
105       This assigns value to the key name in whatever section this line is in.
106       Key names need to be unique per section.  If the value is  enclosed  by
107       double-quotes  ("), the quotes will be ignored.  So the following still
108       assigns value to name:
109
110          name = "value"
111
112       Spaces around the equal sign are ignored, the following are all equiva‐
113       lent:
114
115          name=value
116          name = value
117          name =      value
118
119       Because  spaces  at the beginning and end of the line are also ignored,
120       if you want your value to begin and/or end  with  a  space,  the  value
121       needs to be enclosed in double-quotes:
122
123          name = " value "
124
125       Here the value of the name key has a leading and trailing whitespace.
126
127       To  treat  characters  with  special meaning as literal characters, you
128       need to prepend them with the backslash (\) escape character:
129
130          name = "value\\value\\value"
131
132       Value of this key name results in value\value\value.
133
134       NOTE:
135          The only character with a special meaning right now is the backslash
136          character  (\),  which serves as the escape character.  More will be
137          added in the future.
138
139   Empty Lines & Comments
140       Empty lines and comment lines are ignored when reading the config file,
141       they  do not affect polybar's behavior. Comment lines start with either
142       the ; or the # character.
143
144       NOTE:
145          Inline comments are not supported. For example  the  following  line
146          does  not  end  with a comment, the value of name is actually set to
147          value ; comment:
148
149              name = value ; comment
150

AUTHORS

152       Polybar was created by Michael Carlberg and is currently maintained by Patrick Ziegler.
153       Contributors can be listed on GitHub.
154
155

SEE ALSO

157       polybar(1), polybar-msg(1)
158
160       2016-2023, Michael Carlberg & contributors
161
162
163
164
1653.7.1                            Nov 30, 2023                       POLYBAR(5)
Impressum