1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2025-04-07 17:32:38 -04:00

fix(battery): Cap value of full-at

This commit is contained in:
Michael Carlberg 2017-01-01 04:00:35 +01:00
parent cc5a5ef25c
commit 611ed0e348

View file

@ -25,7 +25,7 @@ namespace modules {
battery_module::battery_module(const bar_settings& bar, string name_)
: inotify_module<battery_module>(bar, move(name_)) {
// Load configuration values
m_fullat = m_conf.get(name(), "full-at", m_fullat);
m_fullat = math_util::min(m_conf.get(name(), "full-at", m_fullat), 100);
m_interval = m_conf.get<decltype(m_interval)>(name(), "poll-interval", 5s);
m_lastpoll = chrono::system_clock::now();