feat(github): New module

Module used to query the GitHub API for information.
Currently only supports notification count.

Ref 
This commit is contained in:
Michael Carlberg 2016-12-19 22:01:37 +01:00
parent e72f85079f
commit b417c9f812
13 changed files with 260 additions and 17 deletions
include/modules

View file

@ -0,0 +1,30 @@
#pragma once
#include "config.hpp"
#include "modules/meta/timer_module.hpp"
#include "utils/http.hpp"
POLYBAR_NS
namespace modules {
/**
* Module used to query the GitHub API for notification count
*/
class github_module : public timer_module<github_module> {
public:
explicit github_module(const bar_settings&, string);
void setup();
bool update();
bool build(builder* builder, const string& tag) const;
private:
static constexpr auto TAG_LABEL = "<label>";
label_t m_label{};
string m_accesstoken{};
unique_ptr<http_downloader> m_http{};
};
}
POLYBAR_NS_END