2014-01-25 16:19:47 +01:00
|
|
|
|
************
|
|
|
|
|
Installation
|
|
|
|
|
************
|
|
|
|
|
|
2014-08-02 21:51:20 +02:00
|
|
|
|
Generic requirements
|
|
|
|
|
====================
|
|
|
|
|
|
2014-12-08 19:52:54 +01:00
|
|
|
|
* Python 2.6 or later, 3.2 or later, PyPy 2.0 or later, PyPy3 2.3 or later. It
|
|
|
|
|
is the only non-optional requirement.
|
2014-12-04 20:57:15 +01:00
|
|
|
|
|
|
|
|
|
.. warning:
|
|
|
|
|
It is highly advised to use UCS-4 version of Python because UCS-2 version
|
|
|
|
|
uses significantly slower text processing (length determination and
|
|
|
|
|
non-printable character replacement) functions due to the need of
|
|
|
|
|
supporting unicode characters above U+FFFF which are represented as
|
|
|
|
|
surrogate pairs. This price will be paid even if configuration has no such
|
|
|
|
|
characters.
|
|
|
|
|
|
2014-08-02 21:51:20 +02:00
|
|
|
|
* C compiler. Required to build powerline client on linux. If it is not present
|
|
|
|
|
then powerline will fall back to shell script or python client.
|
|
|
|
|
* ``socat`` program. Required for shell variant of client which runs a bit
|
|
|
|
|
faster than python version of the client, but still slower than C version.
|
|
|
|
|
* ``psutil`` python package. Required for some segments like cpu_percent. Some
|
|
|
|
|
segments have linux-only fallbacks for ``psutil`` functionality.
|
2016-11-01 05:12:37 +01:00
|
|
|
|
* ``hglib`` python package *and* mercurial executable. Required to work with
|
|
|
|
|
mercurial repositories.
|
2014-08-02 21:51:20 +02:00
|
|
|
|
* ``pygit2`` python package or ``git`` executable. Required to work with ``git``
|
|
|
|
|
repositories.
|
|
|
|
|
* ``bzr`` python package (note: *not* standalone executable). Required to work
|
|
|
|
|
with bazaar repositories.
|
2014-09-02 19:49:23 +02:00
|
|
|
|
* ``pyuv`` python package. Required for :ref:`libuv-based watcher
|
|
|
|
|
<config-common-watcher>` to work.
|
2017-03-18 20:27:14 +01:00
|
|
|
|
* ``i3ipc`` python package. Required for i3wm bindings and segments.
|
2016-04-06 12:56:12 +02:00
|
|
|
|
* ``xrandr`` program. Required for the multi-monitor lemonbar binding and the
|
|
|
|
|
:py:func:`powerline.listers.i3wm.output_lister`.
|
2014-08-02 21:51:20 +02:00
|
|
|
|
|
|
|
|
|
.. note::
|
2016-11-01 05:12:37 +01:00
|
|
|
|
Until bazaar supports Python-3 or PyPy powerline will not support
|
|
|
|
|
repository information when running in these interpreters.
|
2014-08-02 21:51:20 +02:00
|
|
|
|
|
2015-05-30 14:38:02 +02:00
|
|
|
|
.. _repository-root:
|
|
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
When using ``pip`` ``{repository_root}`` directory referenced in
|
|
|
|
|
documentation may be found using ``pip show powerline-status``. In the output
|
|
|
|
|
of ``pip show`` there is a line like ``Location: {path}``, that ``{path}`` is
|
|
|
|
|
``{repository_root}``. Unless it is ``--editable`` installation this is only
|
|
|
|
|
applicable for ``{repository_root}/powerline/…`` paths: something like
|
|
|
|
|
``{repository_root}/scripts/powerline-render`` is not present.
|
|
|
|
|
|
|
|
|
|
When using other packages referenced paths may not exist, in this case refer
|
|
|
|
|
to package documentation.
|
|
|
|
|
|
2014-08-02 21:51:20 +02:00
|
|
|
|
Pip installation
|
|
|
|
|
================
|
|
|
|
|
|
2015-01-07 13:15:31 +01:00
|
|
|
|
Due to a naming conflict with an unrelated project powerline is available on
|
|
|
|
|
PyPI under the ``powerline-status`` name:
|
|
|
|
|
|
|
|
|
|
.. code-block:: sh
|
|
|
|
|
|
|
|
|
|
pip install powerline-status
|
|
|
|
|
|
2015-01-08 16:24:09 +01:00
|
|
|
|
is the preferred method because this will get the latest release. To get current
|
|
|
|
|
development version
|
2014-09-05 18:36:09 +02:00
|
|
|
|
|
|
|
|
|
.. code-block:: sh
|
2014-08-02 21:51:20 +02:00
|
|
|
|
|
2014-12-07 14:08:24 +01:00
|
|
|
|
pip install --user git+git://github.com/powerline/powerline
|
2014-08-02 21:51:20 +02:00
|
|
|
|
|
2015-01-07 13:15:31 +01:00
|
|
|
|
may be used. If powerline was already checked out into some directory
|
2014-09-05 18:36:09 +02:00
|
|
|
|
|
|
|
|
|
.. code-block:: sh
|
2014-08-02 21:51:20 +02:00
|
|
|
|
|
2014-11-30 02:26:04 +01:00
|
|
|
|
pip install --user --editable={path_to_powerline}
|
2014-08-02 21:51:20 +02:00
|
|
|
|
|
2015-01-07 13:15:31 +01:00
|
|
|
|
is useful, but note that in this case ``pip`` will not install ``powerline``
|
|
|
|
|
executable and something like
|
2014-09-05 18:36:09 +02:00
|
|
|
|
|
|
|
|
|
.. code-block:: sh
|
2014-08-02 21:51:20 +02:00
|
|
|
|
|
|
|
|
|
ln -s {path_to_powerline}/scripts/powerline ~/.local/bin
|
|
|
|
|
|
2015-01-07 13:15:31 +01:00
|
|
|
|
will have to be done (:file:`~/.local/bin` should be replaced with some path
|
|
|
|
|
present in ``$PATH``).
|
2014-08-02 21:51:20 +02:00
|
|
|
|
|
2014-08-03 00:04:53 +02:00
|
|
|
|
.. note::
|
2015-01-08 16:24:09 +01:00
|
|
|
|
If ISP blocks git protocol for some reason github also provides ``ssh``
|
2014-12-07 14:08:24 +01:00
|
|
|
|
(``git+ssh://git@github.com/powerline/powerline``) and ``https``
|
|
|
|
|
(``git+https://github.com/powerline/powerline``) protocols. ``git`` protocol
|
2014-08-03 00:04:53 +02:00
|
|
|
|
should be the fastest, but least secure one though.
|
|
|
|
|
|
2014-08-03 00:43:13 +02:00
|
|
|
|
Fonts installation
|
|
|
|
|
==================
|
|
|
|
|
|
|
|
|
|
Powerline uses several special glyphs to get the arrow effect and some custom
|
2015-01-08 16:24:09 +01:00
|
|
|
|
symbols for developers. This requires having either a symbol font or a patched
|
2016-10-28 17:06:18 +02:00
|
|
|
|
font installed in the system. The used application (e.g. terminal emulator) must
|
2015-01-08 16:24:09 +01:00
|
|
|
|
also either be configured to use patched fonts (in some cases even support it
|
|
|
|
|
because custom glyphs live in private use area which some applications reserve
|
|
|
|
|
for themselves) or support fontconfig for powerline to work properly with
|
|
|
|
|
powerline-specific glyphs.
|
|
|
|
|
|
|
|
|
|
:ref:`24-bit color support <config-common-term_truecolor>` may be enabled if
|
|
|
|
|
used terminal emulator supports it (see :ref:`the terminal emulator support
|
2014-08-03 00:43:13 +02:00
|
|
|
|
matrix <usage-terminal-emulators>`).
|
|
|
|
|
|
|
|
|
|
There are basically two ways to get powerline glyphs displayed: use
|
|
|
|
|
:file:`PowerlineSymbols.otf` font as a fallback for one of the existing fonts or
|
|
|
|
|
install a patched font.
|
|
|
|
|
|
|
|
|
|
.. _installation-patched-fonts:
|
|
|
|
|
|
|
|
|
|
Patched fonts
|
|
|
|
|
-------------
|
|
|
|
|
|
2015-09-29 12:50:40 +02:00
|
|
|
|
This method is the fallback method and works for every terminal.
|
2014-08-03 00:43:13 +02:00
|
|
|
|
|
2015-01-08 16:24:09 +01:00
|
|
|
|
Download the font from `powerline-fonts`_. If preferred font can’t be found in
|
|
|
|
|
the `powerline-fonts`_ repo, then patching the preferred font is needed instead.
|
2014-08-03 00:43:13 +02:00
|
|
|
|
|
2014-12-07 14:08:24 +01:00
|
|
|
|
.. _powerline-fonts: https://github.com/powerline/fonts
|
2014-08-03 00:43:13 +02:00
|
|
|
|
|
|
|
|
|
After downloading this font refer to platform-specific instructions.
|
|
|
|
|
|
2014-08-02 21:51:20 +02:00
|
|
|
|
Installation on various platforms
|
|
|
|
|
=================================
|
|
|
|
|
|
2014-01-25 16:19:47 +01:00
|
|
|
|
.. toctree::
|
|
|
|
|
|
|
|
|
|
Linux <installation/linux>
|
|
|
|
|
OS X <installation/osx>
|