fix: Correct type for module interval
This commit is contained in:
parent
a989d401d9
commit
14958bdd23
@ -37,7 +37,7 @@ namespace modules {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
interval_t m_interval{1};
|
interval_t m_interval{1.0};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ namespace modules {
|
|||||||
template class module<cpu_module>;
|
template class module<cpu_module>;
|
||||||
|
|
||||||
cpu_module::cpu_module(const bar_settings& bar, string name_) : timer_module<cpu_module>(bar, move(name_)) {
|
cpu_module::cpu_module(const bar_settings& bar, string name_) : timer_module<cpu_module>(bar, move(name_)) {
|
||||||
m_interval = m_conf.get(name(), "interval", 1s);
|
m_interval = m_conf.get<decltype(m_interval)>(name(), "interval", 1s);
|
||||||
|
|
||||||
m_formatter->add(DEFAULT_FORMAT, TAG_LABEL, {TAG_LABEL, TAG_BAR_LOAD, TAG_RAMP_LOAD, TAG_RAMP_LOAD_PER_CORE});
|
m_formatter->add(DEFAULT_FORMAT, TAG_LABEL, {TAG_LABEL, TAG_BAR_LOAD, TAG_RAMP_LOAD, TAG_RAMP_LOAD_PER_CORE});
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ namespace modules {
|
|||||||
throw module_error("No date or time format specified");
|
throw module_error("No date or time format specified");
|
||||||
}
|
}
|
||||||
|
|
||||||
m_interval = m_conf.get(name(), "interval", 1s);
|
m_interval = m_conf.get<decltype(m_interval)>(name(), "interval", 1s);
|
||||||
|
|
||||||
m_formatter->add(DEFAULT_FORMAT, TAG_LABEL, {TAG_LABEL, TAG_DATE});
|
m_formatter->add(DEFAULT_FORMAT, TAG_LABEL, {TAG_LABEL, TAG_DATE});
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ namespace modules {
|
|||||||
m_remove_unmounted = m_conf.get(name(), "remove-unmounted", m_remove_unmounted);
|
m_remove_unmounted = m_conf.get(name(), "remove-unmounted", m_remove_unmounted);
|
||||||
m_fixed = m_conf.get(name(), "fixed-values", m_fixed);
|
m_fixed = m_conf.get(name(), "fixed-values", m_fixed);
|
||||||
m_spacing = m_conf.get(name(), "spacing", m_spacing);
|
m_spacing = m_conf.get(name(), "spacing", m_spacing);
|
||||||
m_interval = m_conf.get(name(), "interval", 30s);
|
m_interval = m_conf.get<decltype(m_interval)>(name(), "interval", 30s);
|
||||||
|
|
||||||
// Add formats and elements
|
// Add formats and elements
|
||||||
m_formatter->add(
|
m_formatter->add(
|
||||||
|
@ -14,7 +14,7 @@ namespace modules {
|
|||||||
github_module::github_module(const bar_settings& bar, string name_)
|
github_module::github_module(const bar_settings& bar, string name_)
|
||||||
: timer_module<github_module>(bar, move(name_)), m_http(http_util::make_downloader()) {
|
: timer_module<github_module>(bar, move(name_)), m_http(http_util::make_downloader()) {
|
||||||
m_accesstoken = m_conf.get(name(), "token");
|
m_accesstoken = m_conf.get(name(), "token");
|
||||||
m_interval = m_conf.get(name(), "interval", 60s);
|
m_interval = m_conf.get<decltype(m_interval)>(name(), "interval", 60s);
|
||||||
m_empty_notifications = m_conf.get(name(), "empty-notifications", m_empty_notifications);
|
m_empty_notifications = m_conf.get(name(), "empty-notifications", m_empty_notifications);
|
||||||
|
|
||||||
m_formatter->add(DEFAULT_FORMAT, TAG_LABEL, {TAG_LABEL});
|
m_formatter->add(DEFAULT_FORMAT, TAG_LABEL, {TAG_LABEL});
|
||||||
|
@ -15,7 +15,7 @@ namespace modules {
|
|||||||
template class module<memory_module>;
|
template class module<memory_module>;
|
||||||
|
|
||||||
memory_module::memory_module(const bar_settings& bar, string name_) : timer_module<memory_module>(bar, move(name_)) {
|
memory_module::memory_module(const bar_settings& bar, string name_) : timer_module<memory_module>(bar, move(name_)) {
|
||||||
m_interval = m_conf.get(name(), "interval", 1s);
|
m_interval = m_conf.get<decltype(m_interval)>(name(), "interval", 1s);
|
||||||
|
|
||||||
m_formatter->add(DEFAULT_FORMAT, TAG_LABEL, {TAG_LABEL, TAG_BAR_USED, TAG_BAR_FREE});
|
m_formatter->add(DEFAULT_FORMAT, TAG_LABEL, {TAG_LABEL, TAG_BAR_USED, TAG_BAR_FREE});
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ namespace modules {
|
|||||||
m_ping_nth_update = m_conf.get(name(), "ping-interval", m_ping_nth_update);
|
m_ping_nth_update = m_conf.get(name(), "ping-interval", m_ping_nth_update);
|
||||||
m_udspeed_minwidth = m_conf.get(name(), "udspeed-minwidth", m_udspeed_minwidth);
|
m_udspeed_minwidth = m_conf.get(name(), "udspeed-minwidth", m_udspeed_minwidth);
|
||||||
m_accumulate = m_conf.get(name(), "accumulate-stats", m_accumulate);
|
m_accumulate = m_conf.get(name(), "accumulate-stats", m_accumulate);
|
||||||
m_interval = m_conf.get(name(), "interval", 1s);
|
m_interval = m_conf.get<decltype(m_interval)>(name(), "interval", 1s);
|
||||||
|
|
||||||
m_conf.warn_deprecated(name(), "udspeed-minwidth", "%downspeed:min:max% and %upspeed:min:max%");
|
m_conf.warn_deprecated(name(), "udspeed-minwidth", "%downspeed:min:max% and %upspeed:min:max%");
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ namespace modules {
|
|||||||
m_tail = m_conf.get(name(), "tail", m_tail);
|
m_tail = m_conf.get(name(), "tail", m_tail);
|
||||||
m_maxlen = m_conf.get(name(), "maxlen", m_maxlen);
|
m_maxlen = m_conf.get(name(), "maxlen", m_maxlen);
|
||||||
m_ellipsis = m_conf.get(name(), "ellipsis", m_ellipsis);
|
m_ellipsis = m_conf.get(name(), "ellipsis", m_ellipsis);
|
||||||
m_interval = m_conf.get(name(), "interval", m_tail ? 0s : 5s);
|
m_interval = m_conf.get<decltype(m_interval)>(name(), "interval", m_tail ? 0s : 5s);
|
||||||
|
|
||||||
m_conf.warn_deprecated(
|
m_conf.warn_deprecated(
|
||||||
name(), "maxlen", "\"format = <label>\" and \"label = %output:0:" + to_string(m_maxlen) + "%\"");
|
name(), "maxlen", "\"format = <label>\" and \"label = %output:0:" + to_string(m_maxlen) + "%\"");
|
||||||
|
@ -16,7 +16,7 @@ namespace modules {
|
|||||||
: timer_module<temperature_module>(bar, move(name_)) {
|
: timer_module<temperature_module>(bar, move(name_)) {
|
||||||
m_zone = m_conf.get(name(), "thermal-zone", 0);
|
m_zone = m_conf.get(name(), "thermal-zone", 0);
|
||||||
m_tempwarn = m_conf.get(name(), "warn-temperature", 80);
|
m_tempwarn = m_conf.get(name(), "warn-temperature", 80);
|
||||||
m_interval = m_conf.get(name(), "interval", 1s);
|
m_interval = m_conf.get<decltype(m_interval)>(name(), "interval", 1s);
|
||||||
|
|
||||||
m_path = string_util::replace(PATH_TEMPERATURE_INFO, "%zone%", to_string(m_zone));
|
m_path = string_util::replace(PATH_TEMPERATURE_INFO, "%zone%", to_string(m_zone));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user