From 8af7388c93bfb22ea6a61a11bbb977f9f7c352a9 Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Mon, 10 Oct 2016 15:50:47 +0200 Subject: [PATCH] fix: Use module separator from config --- include/components/bar.hpp | 5 +++++ include/components/controller.hpp | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/components/bar.hpp b/include/components/bar.hpp index a66accfb..7bca30e8 100644 --- a/include/components/bar.hpp +++ b/include/components/bar.hpp @@ -193,6 +193,11 @@ class bar { m_bar.wmname = m_conf.get(bs, "wm_name", m_bar.wmname); m_bar.wmname = string_util::replace(m_bar.wmname, " ", "-"); + // }}} + // Set misc parameters {{{ + + m_bar.separator = string_util::trim(m_conf.get(bs, "separator", ""), '"'); + // }}} // Checking nodraw {{{ diff --git a/include/components/controller.hpp b/include/components/controller.hpp index efe55f23..cb2f6797 100644 --- a/include/components/controller.hpp +++ b/include/components/controller.hpp @@ -392,7 +392,7 @@ class controller { } string contents{""}; - string separator{m_bar->settings().separator.empty()}; + string separator{m_bar->settings().separator}; string padding_left(m_bar->settings().padding_left, ' '); string padding_right(m_bar->settings().padding_right, ' '); @@ -409,7 +409,7 @@ class controller { if (module_contents.empty()) continue; - if (!block_contents.empty()) + if (!block_contents.empty() && !separator.empty()) block_contents += separator; if (!(block.first == alignment::LEFT && module == block.second.front()))