Merge pull request #1785 from martingabelmann/fix-1784

add awesome4+ support, fixes #1784
This commit is contained in:
Nikolai Aleksandrovich Pavlov 2017-06-03 23:15:48 +03:00 committed by GitHub
commit 4dc590bde7
2 changed files with 18 additions and 3 deletions

View File

@ -5,7 +5,7 @@ Window manager widgets
Awesome widget
==============
.. note:: Powerline currently only supports awesome 3.5.
.. note:: Powerline currently only supports awesome 3.5 and 4+.
.. note:: The Powerline widget will spawn a shell script that runs in the
background and updates the statusline with ``awesome-client``.
@ -23,7 +23,17 @@ Then add the ``powerline_widget`` to ``wibox``:
.. code-block:: lua
-- awesome3.5
right_layout:add(powerline_widget)
-- awesome4+
s.mywibox:setup {
...
{ -- Right widgets
...
powerline_widget,
},
}
Qtile widget
============

View File

@ -6,5 +6,10 @@ powerline_widget:set_align('right')
function powerline(mode, widget) end
awful.util.spawn_with_shell('powerline-daemon -q')
awful.util.spawn_with_shell('powerline wm.awesome')
if string.find(awesome.version, 'v4') then
awful.spawn.with_shell('powerline-daemon -q')
awful.spawn.with_shell('powerline wm.awesome')
else
awful.util.spawn_with_shell('powerline-daemon -q')
awful.util.spawn_with_shell('powerline wm.awesome')
end