awesome-wm-widgets/gerrit-widget
2019-11-05 21:36:44 -05:00
..
gerrit.lua refactoring 2019-11-05 21:36:44 -05:00
gerrit_icon.svg added icon 2019-10-01 21:49:58 -04:00
README.md added readme for the gerrit widget 2019-09-25 22:21:37 -04:00

Gerrit widget

This widget adds support for Gerrit. It shows number of currently assigned reviews to the user and shows a notification when new review is assigned.

Customization

It is possible to customize widget by providing a table with all or some of the following config parameters:

Name Default Description
host Required Ex https://gerrit.tmnt.com
query is:reviewer AND status:open AND NOT is:wip Query to retrieve reviews

Prerequisite

  • curl - is used to communicate with gerrit's REST API
  • setup netrc which is used to store username and password in order to call API's endpoints.

Installation

  1. Download json parser for lua from github.com/rxi/json.lua and place it under ~/.config/awesome/ (don't forget to star a repo):

    wget -P ~/.config/awesome/ https://raw.githubusercontent.com/rxi/json.lua/master/json.lua
    
  2. Clone this repo (if not cloned yet) under ~/.config/awesome/:

    git clone https://github.com/streetturtle/awesome-wm-widgets.git ~/.config/awesome/
    
  3. Require widget at the top of the rc.lua:

    local gerrit_widget = require("awesome-wm-widgets.gerrit-widget.gerrit")
    
  4. Add widget to the tasklist:

    s.mytasklist, -- Middle widget
        { -- Right widgets
            layout = wibox.layout.fixed.horizontal,
            ...
            --default
            gerrit_widget({host = 'https://gerrit.tmnt.com'}),
            --customized
            gerrit_widget({
                host = 'https://gerrit.tmnt.com',
                query = 'is:reviewer AND is:wip'
            })
            ...