2014-01-25 16:19:47 +01:00
|
|
|
|
**********************
|
|
|
|
|
Window manager widgets
|
|
|
|
|
**********************
|
|
|
|
|
|
2014-08-02 21:51:20 +02:00
|
|
|
|
Awesome widget
|
|
|
|
|
==============
|
2014-01-25 16:19:47 +01:00
|
|
|
|
|
2014-08-02 21:51:20 +02:00
|
|
|
|
.. note:: Powerline currently only supports awesome 3.5.
|
|
|
|
|
|
|
|
|
|
.. note:: The Powerline widget will spawn a shell script that runs in the
|
|
|
|
|
background and updates the statusline with ``awesome-client``.
|
|
|
|
|
|
2015-01-08 16:24:09 +01:00
|
|
|
|
Add the following to :file:`rc.lua`, where ``{repository_root}`` is the absolute
|
|
|
|
|
path to Powerline installation directory:
|
2014-08-02 21:51:20 +02:00
|
|
|
|
|
|
|
|
|
.. code-block:: lua
|
|
|
|
|
|
|
|
|
|
package.path = package.path .. ';{repository_root}/powerline/bindings/awesome/?.lua'
|
|
|
|
|
require('powerline')
|
|
|
|
|
|
2015-01-08 16:24:09 +01:00
|
|
|
|
Then add the ``powerline_widget`` to ``wibox``:
|
2014-08-02 21:51:20 +02:00
|
|
|
|
|
|
|
|
|
.. code-block:: lua
|
|
|
|
|
|
|
|
|
|
right_layout:add(powerline_widget)
|
|
|
|
|
|
|
|
|
|
Qtile widget
|
|
|
|
|
============
|
|
|
|
|
|
2015-01-08 16:24:09 +01:00
|
|
|
|
Add the following to :file:`~/.config/qtile/config.py`:
|
2014-08-02 21:51:20 +02:00
|
|
|
|
|
|
|
|
|
.. code-block:: python
|
|
|
|
|
|
|
|
|
|
from powerline.bindings.qtile.widget import Powerline
|
|
|
|
|
|
|
|
|
|
screens = [
|
|
|
|
|
Screen(
|
|
|
|
|
top=bar.Bar([
|
|
|
|
|
# ...
|
|
|
|
|
Powerline(timeout=2),
|
|
|
|
|
# ...
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
]
|
|
|
|
|
|
2015-01-08 00:03:34 +01:00
|
|
|
|
.. _bar-usage:
|
|
|
|
|
|
|
|
|
|
LemonBoy’s bar
|
|
|
|
|
=============
|
|
|
|
|
|
|
|
|
|
To run the bar simply pipe the output of the binding script into ``bar`` and specify appropriate
|
|
|
|
|
options, for example like this::
|
|
|
|
|
|
|
|
|
|
python powerline-bar.py | bar -f "-xos4-*"
|
|
|
|
|
|
|
|
|
|
to run with i3, simply ``exec`` this in i3 config file::
|
|
|
|
|
|
|
|
|
|
exec python powerline-bar.py | bar -f "-xos4-*"
|
|
|
|
|
|
|
|
|
|
See the `bar documentation <https://github.com/LemonBoy/bar>`_ for more information and options.
|
|
|
|
|
|
2014-08-02 21:51:20 +02:00
|
|
|
|
I3 bar
|
|
|
|
|
======
|
|
|
|
|
|
2015-01-08 16:24:09 +01:00
|
|
|
|
.. note::
|
2015-01-08 00:03:34 +01:00
|
|
|
|
As the patch to include background-colors in i3bar is likely not to be
|
|
|
|
|
merged, it is recommended to instead run ``bar`` (see above). The source for
|
|
|
|
|
i3bgbar is however still available `here
|
|
|
|
|
<https://github.com/S0lll0s/i3bgbar>`_.
|
2014-08-02 21:51:20 +02:00
|
|
|
|
|
2015-01-08 16:24:09 +01:00
|
|
|
|
Add the following to :file:`~/.i3/config`::
|
2014-08-02 21:51:20 +02:00
|
|
|
|
|
|
|
|
|
bar {
|
|
|
|
|
i3bar_command i3bgbar
|
|
|
|
|
|
|
|
|
|
status_command python /path/to/powerline/bindings/i3/powerline-i3.py
|
|
|
|
|
font pango:PowerlineFont 12
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
where ``i3bgbar`` may be replaced with the path to the custom i3bar binary and
|
|
|
|
|
``PowerlineFont`` is any system font with powerline support.
|