mirror of
https://github.com/streetturtle/awesome-wm-widgets.git
synced 2024-11-17 07:49:09 +01:00
.. | ||
gerrit.lua | ||
gerrit_icon.svg | ||
README.md |
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
-
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
-
Clone this repo (if not cloned yet) under ~/.config/awesome/:
git clone https://github.com/streetturtle/awesome-wm-widgets.git ~/.config/awesome/
-
Require widget at the top of the rc.lua:
local gerrit_widget = require("awesome-wm-widgets.gerrit-widget.gerrit")
-
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' }) ...