2014-09-04 17:50:45 +02:00
|
|
|
|
.. _config-segments:
|
|
|
|
|
|
2014-08-02 21:51:20 +02:00
|
|
|
|
*****************
|
|
|
|
|
Segment reference
|
|
|
|
|
*****************
|
|
|
|
|
|
|
|
|
|
Segments
|
|
|
|
|
========
|
|
|
|
|
|
|
|
|
|
Segments are written in Python, and the default segments provided with
|
|
|
|
|
Powerline are located in :file:`powerline/segments/{extension}.py`.
|
|
|
|
|
User-defined segments can be defined in any module in ``sys.path`` or
|
|
|
|
|
:ref:`paths common configuration option <config-common-paths>`, import is
|
|
|
|
|
always absolute.
|
|
|
|
|
|
|
|
|
|
Segments are regular Python functions, and they may accept arguments. All
|
|
|
|
|
arguments should have a default value which will be used for themes that
|
2014-09-20 15:40:33 +02:00
|
|
|
|
don’t provide an ``args`` dict.
|
2014-08-02 21:51:20 +02:00
|
|
|
|
|
2014-08-16 11:06:19 +02:00
|
|
|
|
More information is available in :ref:`Writing segments <dev-segments>` section.
|
2014-08-02 21:51:20 +02:00
|
|
|
|
|
|
|
|
|
Available segments
|
|
|
|
|
==================
|
|
|
|
|
|
|
|
|
|
.. toctree::
|
|
|
|
|
:glob:
|
|
|
|
|
|
|
|
|
|
segments/*
|