mirror of
https://github.com/polybar/polybar.git
synced 2026-02-18 12:45:39 +00:00
refactor(tokens): Move token suffix to configuration
This commit is contained in:
@ -31,7 +31,7 @@ namespace modules {
|
||||
m_formatter->add(DEFAULT_FORMAT, TAG_LABEL, {TAG_LABEL, TAG_BAR, TAG_RAMP});
|
||||
|
||||
if (m_formatter->has(TAG_LABEL)) {
|
||||
m_label = load_optional_label(m_conf, name(), TAG_LABEL, "%percentage%");
|
||||
m_label = load_optional_label(m_conf, name(), TAG_LABEL, "%percentage%%");
|
||||
}
|
||||
if (m_formatter->has(TAG_BAR)) {
|
||||
m_progressbar = load_progressbar(m_bar, m_conf, name(), TAG_BAR);
|
||||
@ -61,7 +61,7 @@ namespace modules {
|
||||
|
||||
if (m_label) {
|
||||
m_label->reset_tokens();
|
||||
m_label->replace_token("%percentage%", to_string(m_percentage) + "%");
|
||||
m_label->replace_token("%percentage%", to_string(m_percentage));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user