From 1cf2f378d4a0e5e3da757d90404c2816a6765626 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Wed, 6 Jul 2022 22:12:03 +0200 Subject: added ls blurring --- src/config/ConfigManager.cpp | 15 +++++++++++++++ src/config/ConfigManager.hpp | 3 +++ 2 files changed, 18 insertions(+) (limited to 'src/config') diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index ded23733..2e594a4f 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -552,6 +552,10 @@ void CConfigManager::handleWindowRule(const std::string& command, const std::str } +void CConfigManager::handleBlurLS(const std::string& command, const std::string& value) { + m_dBlurLSNamespaces.emplace_back(value); +} + void CConfigManager::handleDefaultWorkspace(const std::string& command, const std::string& value) { const auto DISPLAY = value.substr(0, value.find_first_of(',')); @@ -670,6 +674,7 @@ std::string CConfigManager::parseKeyword(const std::string& COMMAND, const std:: else if (COMMAND == "animation") handleAnimation(COMMAND, VALUE); else if (COMMAND == "source") handleSource(COMMAND, VALUE); else if (COMMAND == "submap") handleSubmap(COMMAND, VALUE); + else if (COMMAND == "blurls") handleBlurLS(COMMAND, VALUE); else configSetValueSafe(currentCategory + (currentCategory == "" ? "" : ":") + COMMAND, VALUE); @@ -772,6 +777,7 @@ void CConfigManager::loadConfigLoadVars() { m_mAdditionalReservedAreas.clear(); configDynamicVars.clear(); deviceConfigs.clear(); + m_dBlurLSNamespaces.clear(); // paths configPaths.clear(); @@ -1103,3 +1109,12 @@ bool CConfigManager::deviceConfigExists(const std::string& dev) { return it != deviceConfigs.end(); } +bool CConfigManager::shouldBlurLS(const std::string& ns) { + for (auto& bls : m_dBlurLSNamespaces) { + if (bls == ns) { + return true; + } + } + + return false; +} diff --git a/src/config/ConfigManager.hpp b/src/config/ConfigManager.hpp index bcb2fbe5..1d281c40 100644 --- a/src/config/ConfigManager.hpp +++ b/src/config/ConfigManager.hpp @@ -65,6 +65,7 @@ public: float getDeviceFloat(const std::string&, const std::string&); std::string getDeviceString(const std::string&, const std::string&); bool deviceConfigExists(const std::string&); + bool shouldBlurLS(const std::string&); SConfigValue* getConfigValuePtr(std::string); @@ -102,6 +103,7 @@ private: std::deque m_dMonitorRules; std::deque m_dWindowRules; + std::deque m_dBlurLSNamespaces; bool firstExecDispatched = false; std::deque firstExecRequests; @@ -127,6 +129,7 @@ private: void handleAnimation(const std::string&, const std::string&); void handleSource(const std::string&, const std::string&); void handleSubmap(const std::string&, const std::string&); + void handleBlurLS(const std::string&, const std::string&); }; inline std::unique_ptr g_pConfigManager; \ No newline at end of file -- cgit v1.2.3