polybar-dwm/doc
Michał Górny a33e8de922 doc: Defer parsing version_txt to fix an obscure bug
Defer parsing the version read from version.txt until it's about
to be used, in order to fix an obscure bug involving indirect
pkg_resources.

When pkg_resources are imported, they override packaging with their own
pkg_resources.extern.packaging.  Depending on the system, this could
either wrap the vendored pkg_resources._vendor.packaging or system
packaging.  For some reason, in the latter case the Version objects
created prior to the wrapping are incompatible with the objects created
afterwards.  This causes the doc build to fail with:

```
Exception occurred:
  File "/tmp/polybar/build/doc/conf.py", line 249, in run
    if directive_version > version_txt:
TypeError: '>' not supported between instances of 'Version' and 'Version'
```

This happens because apparently pkg_resources are imported indirectly
somewhere between conf.py processing and running VersionDirective.
Deferring version parsing until the latter guarantees that both objects
are constructed at the same point in program flow and therefore use
the same packaging package.
2022-01-31 01:20:18 +01:00
..
_static Create default config (#2511) 2021-10-05 13:07:19 +02:00
dev Add items for milestones and readthedocs to release workflow 2021-01-07 20:48:04 +01:00
man Use sockets for IPC (#2539) 2022-01-22 20:35:37 +01:00
user Use sockets for IPC (#2539) 2022-01-22 20:35:37 +01:00
.gitignore build: Allow doc to build as its own project 2019-05-10 08:14:02 +02:00
CMakeLists.txt Install manpage for polybar-msg 2022-01-24 13:47:49 +01:00
conf.py doc: Defer parsing version_txt to fix an obscure bug 2022-01-31 01:20:18 +01:00
config.ini Create default config (#2511) 2021-10-05 13:07:19 +02:00
index.rst Use sockets for IPC (#2539) 2022-01-22 20:35:37 +01:00
README.md refactor(cmake): Allow targets to be enabled individually 2020-12-24 02:20:38 +01:00

Polybar Manual

The official polybar documentation lives here.

The html documentation and man pages are built automatically when you build with cmake (cmake creates the custom target doc).

Preview Locally

The documentation uses Sphinx to generate the documentation, so you will need to have that installed.

If you build polybar normally while having Sphinx installed during configuration, the documentation will be enabled and built as well. Building the documentation can be disabled by passing -DBUILD_DOC=OFF to cmake.

Once configured, all of the documentation can be generated with make doc or use make doc_html or make doc_man to only generate the html documentation or the man pages respectively.

The HTML documentation is in doc/html/index.html in your build directory and the man pages are in doc/man.