From 1e361fa9ca00efaa74f3d32409a3ffcd5c8f09f2 Mon Sep 17 00:00:00 2001
From: patrick96
Date: Sun, 2 Dec 2018 19:05:48 +0100
Subject: [PATCH] doc: Add manpage as rst file
This allows us to also have the manual as part of the generated html
documentation.
The syntax is also easier to use.
Right now the man page installed on the system is not replaced with the
rst file, this will come in a later step
---
doc/conf.py | 13 ++++----
doc/index.rst | 6 ++++
doc/man/polybar.1.rst | 69 +++++++++++++++++++++++++++++++++++++++++++
3 files changed, 81 insertions(+), 7 deletions(-)
create mode 100644 doc/man/polybar.1.rst
diff --git a/doc/conf.py b/doc/conf.py
index aa144df9..00b909ce 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -19,14 +19,15 @@
# -- Project information -----------------------------------------------------
-project = 'polybar'
-copyright = '2018, Polybar Team'
+project = 'Polybar User Manual'
+copyright = ''
author = 'Polybar Team'
# The short X.Y version
-version = ''
+# TODO set this dynamically
+version = '3.2.1'
# The full version, including alpha/beta/rc tags
-release = ''
+release = version
# -- General configuration ---------------------------------------------------
@@ -138,11 +139,9 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
- (master_doc, 'polybar', 'polybar Documentation',
- [author], 1)
+ ('man/polybar.1', 'polybar', 'A fast and easy-to-use tool status bar', [], 1)
]
-
# -- Options for Texinfo output ----------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
diff --git a/doc/index.rst b/doc/index.rst
index 1c089dc3..f1a35d1b 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -12,6 +12,12 @@ Welcome to the official polybar documentation.
:maxdepth: 2
:caption: Contents:
+.. toctree::
+ :maxdepth: 1
+ :caption: Manual Pages:
+
+ man/polybar.1
+
Getting Help
============
diff --git a/doc/man/polybar.1.rst b/doc/man/polybar.1.rst
new file mode 100644
index 00000000..bc5153d7
--- /dev/null
+++ b/doc/man/polybar.1.rst
@@ -0,0 +1,69 @@
+polybar(1)
+==========
+
+SYNOPSIS
+--------
+**polybar** [*OPTIONS*]... *BAR*
+
+DESCRIPTION
+-----------
+Polybar aims to help users build beautiful and highly customizable status bars for their desktop environment, without the need of having a black belt in shell scripting.
+
+OPTIONS
+-------
+
+.. program:: polybar
+
+.. option:: -h, --help
+
+ Display help text and exit
+
+.. option:: -v, --version
+
+ Display build details and exit
+.. option:: -l, --log=LEVEL
+
+ | Set the logging verbosity (default: **WARNING**)
+ | *LEVEL* is one of: error, warning, info, trace
+.. option:: -q, --quiet
+
+ Be quiet (will override -l)
+.. option:: -c, --config=FILE
+
+ Specify the path to the configuration file. By default, the configuration file is loaded from:
+
+ |
+ | **$XDG_CONFIG_HOME/polybar/config**
+ | **$HOME/.config/polybar/config**
+.. option:: -r, --reload
+
+ Reload the application when the config file has been modified
+.. option:: -d, --dump=PARAM
+
+ Print the value of the specified parameter *PARAM* in bar section and exit
+.. option:: -m, --list-monitors
+
+ Print list of available monitors and exit
+.. option:: -w, --print-wmname
+
+ Print the generated *WM_NAME* and exit
+.. option:: -s, --stdout
+
+ Output the data to stdout instead of drawing it to the X window
+.. option:: -p, --png=FILE
+
+ Save png snapshot to *FILE* after running for 3 seconds
+
+AUTHOR
+------
+| Michael Carlberg
+| Contributors can be listed on GitHub.
+
+REPORTING BUGS
+--------------
+Report issues on GitHub
+
+SEE ALSO
+--------
+| Full documentation at:
+| Project wiki: