diff --git a/docs/source/usage/wm-widgets.rst b/docs/source/usage/wm-widgets.rst index 7dabd275..204c008c 100644 --- a/docs/source/usage/wm-widgets.rst +++ b/docs/source/usage/wm-widgets.rst @@ -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 ============ diff --git a/powerline/bindings/awesome/powerline.lua b/powerline/bindings/awesome/powerline.lua index 82a245e0..470901fc 100644 --- a/powerline/bindings/awesome/powerline.lua +++ b/powerline/bindings/awesome/powerline.lua @@ -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