1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2025-07-07 19:02:26 -04:00

refactor(modules): Move setup to constructor

This commit is contained in:
Michael Carlberg 2016-12-21 08:00:09 +01:00
parent 81e6fb062f
commit c01f111e34
52 changed files with 100 additions and 149 deletions

View file

@ -13,13 +13,8 @@ namespace modules {
/**
* Construct module
*/
github_module::github_module(const bar_settings& bar, string name)
: timer_module<github_module>(bar, name), m_http(http_util::make_downloader()) {}
/**
* Bootstrap module
*/
void github_module::setup() {
github_module::github_module(const bar_settings& bar, string name_)
: timer_module<github_module>(bar, move(name_)), m_http(http_util::make_downloader()) {
m_accesstoken = m_conf.get<string>(name(), "token");
m_interval = m_conf.get(name(), "interval", 60s);
m_empty_notifications = m_conf.get(name(), "empty-notifications", m_empty_notifications);