How to use i3status with awesome WM

In order to use i3status program in conjunction with awesomeWM I came up with this:

  1. In your rc.lua create new text widget:

    myi3status = wibox.widget.textbox()
    (…)
    right_layout:add(myi3status)
    
  2. On the bottom add function:

    set_status = function (text)
     myi3status:set_text(text);
    end
    
  3. Add this to your login script (~/.xinitrc if you are using startx):

    (i3status | while read LINE; do (echo "set_status('$LINE')" | awesome-client