diff --git a/CHANGELOG.md b/CHANGELOG.md index 1336f17a..ee54fa13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,6 +62,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - IPC commands to change visibility of modules (`hide.`, `show.`, and `toggle.`) ([`#2108`](https://github.com/polybar/polybar/issues/2108)) +- Config option to hide a certain module + (`hidden = false`) + ([`#2108`](https://github.com/polybar/polybar/issues/2108)) - `internal/xworkspaces`: Make the urgent hint persistent ([`#1081`](https://github.com/polybar/polybar/issues/1081)) diff --git a/config/config.cmake b/config/config.cmake index ce999856..5acd8ce9 100644 --- a/config/config.cmake +++ b/config/config.cmake @@ -274,6 +274,8 @@ format-underline = #0a6cf5 label = %date% %time% +;hidden = true + [module/pulseaudio] type = internal/pulseaudio diff --git a/include/modules/meta/base.inl b/include/modules/meta/base.inl index 9551fa97..608fe67c 100644 --- a/include/modules/meta/base.inl +++ b/include/modules/meta/base.inl @@ -20,7 +20,8 @@ namespace modules { , m_name_raw(name) , m_builder(make_unique(bar)) , m_formatter(make_unique(m_conf, m_name)) - , m_handle_events(m_conf.get(m_name, "handle-events", true)) {} + , m_handle_events(m_conf.get(m_name, "handle-events", true)) + , m_visible(!m_conf.get(m_name, "hidden", false)) {} template module::~module() noexcept {