diff --git a/config.cmake b/config.cmake index ad66c49d..710de7fd 100644 --- a/config.cmake +++ b/config.cmake @@ -168,7 +168,7 @@ label-urgent-padding = 2 [module/dwm] type = internal/dwm -format = +format = > enable-click = false diff --git a/include/modules/dwm.hpp b/include/modules/dwm.hpp index 74f64098..cf49284b 100644 --- a/include/modules/dwm.hpp +++ b/include/modules/dwm.hpp @@ -56,11 +56,11 @@ namespace modules { auto input(string&& cmd) -> bool override; private: - static constexpr const char* DEFAULT_FORMAT_TAGS{" "}; + static constexpr const char* DEFAULT_FORMAT_TAGS{" "}; static constexpr const char* DEFAULT_STATE_LABEL{"%name%"}; /** - * The state label is used to represent a tag. This label is replaced by one + * The tags label is replaced with the tags. Each tag is displayed using one * of the following labels based on the tag state: * * label-focused * * label-unfocused @@ -68,7 +68,7 @@ namespace modules { * * label-urgent * * label-empty */ - static constexpr const char* TAG_LABEL_STATE{""}; + static constexpr const char* TAG_LABEL_TAGS{""}; /** * The layout label is replaced by the current layout symbol diff --git a/src/modules/dwm.cpp b/src/modules/dwm.cpp index 8eabb201..e73458f9 100644 --- a/src/modules/dwm.cpp +++ b/src/modules/dwm.cpp @@ -28,10 +28,11 @@ namespace modules { m_ipc = factory_util::unique(socket_path); // Load configuration - m_formatter->add(DEFAULT_FORMAT, DEFAULT_FORMAT_TAGS, {TAG_LABEL_STATE, TAG_LABEL_LAYOUT, TAG_LABEL_TITLE}); + m_formatter->add( + DEFAULT_FORMAT, DEFAULT_FORMAT_TAGS, {TAG_LABEL_TAGS, TAG_LABEL_LAYOUT, TAG_LABEL_TITLE}); // Populate m_state_labels map with labels and their states - if (m_formatter->has(TAG_LABEL_STATE)) { + if (m_formatter->has(TAG_LABEL_TAGS)) { m_state_labels.insert( std::make_pair(state_t::FOCUSED, load_optional_label(m_conf, name(), "label-focused", DEFAULT_STATE_LABEL))); m_state_labels.insert(std::make_pair( @@ -164,7 +165,7 @@ namespace modules { } else { builder->node(m_layout_label); } - } else if (tag == TAG_LABEL_STATE) { + } else if (tag == TAG_LABEL_TAGS) { bool first = true; for (const auto& tag : m_tags) { // Don't insert separator before first tag