awesome-wm-widgets/github-contributions-widget
2021-04-11 20:31:27 +01:00
..
screenshots [github-contribution] add themes 2020-11-09 10:09:34 -05:00
github-contributions-widget.lua github-contributions-widget: fix line too long warning 2021-04-11 20:31:27 +01:00
README.md [github-contributions] fix issue caused by changed api contract 2020-12-24 20:53:53 -05:00
themes.lua [github-contributions] fix issue caused by changed api contract 2020-12-24 20:53:53 -05:00

Github Contributions Widget

The widget is inspired by the https://github-contributions.now.sh/ and relies on it's API.

It shows the contribution graph, similar to the one on the github profile page: screenshot

You might wonder what could be the reason to have your github's contributions in front of you all day long? The more you contribute, the nicer widget looks! Check out Thomashighbaugh's graph:

Customization

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

Name Default Description
username streetturtle GitHub username
days 365 Number of days in the past, more days - wider the widget
color_of_empty_cells Theme's default Color of the days with no contributions
with_border true Should the graph contains border or not
margin_top 1 Top margin
theme standard Color theme of the graph, see below

Note: widget height is 21px (7 rows of 3x3 cells). So it would look nice on the wibar of 22-24px height.

Themes

Following themes are available:

Theme name Preview
standard standard
classic classic
teal teal
leftpad leftpad
dracula dracula
pink pink

To add a new theme, simply add a new entry in themes table (themes.lua) with the colors of your theme.

Screenshots

1000 days, with border:
screenshot1

365 days, no border:
screenshot2

Installation

Clone/download repo under ~/.config/awesome and use widget in rc.lua:

local github_contributions_widget = require("awesome-wm-widgets.github-contributions-widget.github-contributions-widget")
...
s.mytasklist, -- Middle widget
	{ -- Right widgets
    	layout = wibox.layout.fixed.horizontal,
		...
		-- default
        github_contributions_widget({username = '<your username>'}),
		...