mirror of
https://github.com/polybar/polybar.git
synced 2024-11-18 13:55:11 -05:00
parent
abdd5f9233
commit
06adef1055
4 changed files with 7 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
||||||
# Maintainer: Michael Carlberg <c@rlberg.se>
|
# Maintainer: Michael Carlberg <c@rlberg.se>
|
||||||
# Contributor: Michael Carlberg <c@rlberg.se>
|
# Contributor: Michael Carlberg <c@rlberg.se>
|
||||||
pkgname=polybar
|
pkgname=polybar
|
||||||
pkgver=3.2.0
|
pkgver=3.2.1
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="A fast and easy-to-use status bar"
|
pkgdesc="A fast and easy-to-use status bar"
|
||||||
arch=("i686" "x86_64")
|
arch=("i686" "x86_64")
|
||||||
|
|
|
@ -37,6 +37,7 @@ namespace modules {
|
||||||
ramp_t m_rampload;
|
ramp_t m_rampload;
|
||||||
ramp_t m_rampload_core;
|
ramp_t m_rampload_core;
|
||||||
label_t m_label;
|
label_t m_label;
|
||||||
|
int m_ramp_padding;
|
||||||
|
|
||||||
vector<cpu_time_t> m_cputimes;
|
vector<cpu_time_t> m_cputimes;
|
||||||
vector<cpu_time_t> m_cputimes_prev;
|
vector<cpu_time_t> m_cputimes_prev;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define GIT_TAG "3.2.0"
|
#define GIT_TAG "3.2.1"
|
||||||
#define GIT_TAG_NAMESPACE v3_2_0
|
#define GIT_TAG_NAMESPACE v3_2_1
|
||||||
|
|
|
@ -18,6 +18,8 @@ namespace modules {
|
||||||
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<decltype(m_interval)>(name(), "interval", 1s);
|
m_interval = m_conf.get<decltype(m_interval)>(name(), "interval", 1s);
|
||||||
|
|
||||||
|
m_ramp_padding = m_conf.get<decltype(m_ramp_padding)>(name(), "ramp-coreload-spacing", 1);
|
||||||
|
|
||||||
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});
|
||||||
|
|
||||||
// warmup cpu times
|
// warmup cpu times
|
||||||
|
@ -88,7 +90,7 @@ namespace modules {
|
||||||
auto i = 0;
|
auto i = 0;
|
||||||
for (auto&& load : m_load) {
|
for (auto&& load : m_load) {
|
||||||
if (i++ > 0) {
|
if (i++ > 0) {
|
||||||
builder->space(1);
|
builder->space(m_ramp_padding);
|
||||||
}
|
}
|
||||||
builder->node(m_rampload_core->get_by_percentage(load));
|
builder->node(m_rampload_core->get_by_percentage(load));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue