mirror of
https://github.com/polybar/polybar.git
synced 2024-11-25 13:55:47 -05:00
fix(modules): Separate prefix and suffix from output
This commit is contained in:
parent
e381d76908
commit
f3bddc5af4
1 changed files with 2 additions and 2 deletions
|
@ -14,6 +14,7 @@ namespace modules {
|
||||||
builder->flush();
|
builder->flush();
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
builder->node(prefix);
|
||||||
|
|
||||||
if (offset != 0) {
|
if (offset != 0) {
|
||||||
builder->offset(offset);
|
builder->offset(offset);
|
||||||
|
@ -38,9 +39,7 @@ namespace modules {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!output.empty()) {
|
if (!output.empty()) {
|
||||||
builder->node(prefix);
|
|
||||||
builder->append(move(output));
|
builder->append(move(output));
|
||||||
builder->node(suffix);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (padding > 0) {
|
if (padding > 0) {
|
||||||
|
@ -61,6 +60,7 @@ namespace modules {
|
||||||
if (margin > 0) {
|
if (margin > 0) {
|
||||||
builder->space(margin);
|
builder->space(margin);
|
||||||
}
|
}
|
||||||
|
builder->node(suffix);
|
||||||
|
|
||||||
return builder->flush();
|
return builder->flush();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue