1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2024-11-11 13:50:56 -05:00

fix(fs): Only add spacing between shown mountpoints

Fixes #2458
This commit is contained in:
patrick96 2021-07-10 22:08:49 +02:00 committed by Patrick Ziegler
parent c901826317
commit 523e4d6313

View file

@ -136,10 +136,16 @@ namespace modules {
string output;
for (m_index = 0_z; m_index < m_mounts.size(); ++m_index) {
if (!output.empty()) {
string mount_output = timer_module::get_output();
/*
* Add spacing before the mountpoint, but only if the mountpoint contents
* are not empty and there is already other content in the module.
*/
if (!output.empty() && !mount_output.empty()) {
m_builder->space(m_spacing);
output += m_builder->flush();
}
output += timer_module::get_output();
output += mount_output;
}
return output;