From 7883ef82fedc63126929a7562df54f41411ecee0 Mon Sep 17 00:00:00 2001 From: Mihir Lad Date: Mon, 20 Jul 2020 00:27:46 -0400 Subject: [PATCH] dwm: Rename DEFAULT_TAG_LABEL to ..._STATE_LABEL State makes more sense than tag. --- include/modules/dwm.hpp | 2 +- src/modules/dwm.cpp | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/include/modules/dwm.hpp b/include/modules/dwm.hpp index df28fc77..449f0d99 100644 --- a/include/modules/dwm.hpp +++ b/include/modules/dwm.hpp @@ -42,7 +42,7 @@ namespace modules { private: static constexpr const char* DEFAULT_FORMAT_TAGS{" "}; - static constexpr const char* DEFAULT_TAG_LABEL{"%name%"}; + static constexpr const char* DEFAULT_STATE_LABEL{"%name%"}; static constexpr const char* TAG_LABEL_STATE{""}; static constexpr const char* TAG_LABEL_LAYOUT{""}; diff --git a/src/modules/dwm.cpp b/src/modules/dwm.cpp index ed2fc6d7..32a34b77 100644 --- a/src/modules/dwm.cpp +++ b/src/modules/dwm.cpp @@ -33,16 +33,15 @@ namespace modules { // Populate m_state_labels map with labels and their states if (m_formatter->has(TAG_LABEL_STATE)) { m_state_labels.insert( - std::make_pair(state_t::FOCUSED, load_optional_label(m_conf, name(), "label-focused", DEFAULT_TAG_LABEL))); + std::make_pair(state_t::FOCUSED, load_optional_label(m_conf, name(), "label-focused", DEFAULT_STATE_LABEL))); m_state_labels.insert(std::make_pair( - state_t::UNFOCUSED, load_optional_label(m_conf, name(), "label-unfocused", DEFAULT_TAG_LABEL))); + state_t::UNFOCUSED, load_optional_label(m_conf, name(), "label-unfocused", DEFAULT_STATE_LABEL))); m_state_labels.insert( - std::make_pair(state_t::VISIBLE, load_optional_label(m_conf, name(), "label-visible", DEFAULT_TAG_LABEL))); + std::make_pair(state_t::VISIBLE, load_optional_label(m_conf, name(), "label-visible", DEFAULT_STATE_LABEL))); m_state_labels.insert( - std::make_pair(state_t::URGENT, load_optional_label(m_conf, name(), "label-urgent", DEFAULT_TAG_LABEL))); - // Dummy label for unoccupied tags + std::make_pair(state_t::URGENT, load_optional_label(m_conf, name(), "label-urgent", DEFAULT_STATE_LABEL))); m_state_labels.insert( - std::make_pair(state_t::NONE, load_optional_label(m_conf, name(), "label-none", DEFAULT_TAG_LABEL))); + std::make_pair(state_t::NONE, load_optional_label(m_conf, name(), "label-none", DEFAULT_STATE_LABEL))); } m_seperator_label = load_optional_label(m_conf, name(), "label-separator", "");