From ccbc0e4a2e4b1bcd9966b59edfbb0aaf6c27a52d Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Thu, 24 Mar 2022 18:22:01 +0100 Subject: Added window rules --- src/config/ConfigManager.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/config/ConfigManager.hpp') diff --git a/src/config/ConfigManager.hpp b/src/config/ConfigManager.hpp index c34aadb1..8c38efa5 100644 --- a/src/config/ConfigManager.hpp +++ b/src/config/ConfigManager.hpp @@ -6,6 +6,9 @@ #include "../defines.hpp" #include #include +#include +#include +#include "../Window.hpp" struct SConfigValue { int64_t intValue = -1; @@ -23,6 +26,11 @@ struct SMonitorRule { int defaultWorkspaceID = -1; }; +struct SWindowRule { + std::string szRule; + std::string szValue; +}; + class CConfigManager { public: CConfigManager(); @@ -36,6 +44,8 @@ public: SMonitorRule getMonitorRuleFor(std::string); + std::vector getMatchingRules(CWindow*); + private: std::unordered_map configValues; time_t lastModifyTime = 0; // for reloading the config if changed @@ -47,6 +57,7 @@ private: bool isFirstLaunch = true; // For exec-once std::deque m_dMonitorRules; + std::deque m_dWindowRules; // internal methods void loadConfigLoadVars(); @@ -56,6 +67,7 @@ private: void handleRawExec(const std::string&, const std::string&); void handleMonitor(const std::string&, const std::string&); void handleBind(const std::string&, const std::string&); + void handleWindowRule(const std::string&, const std::string&); void handleDefaultWorkspace(const std::string&, const std::string&); }; -- cgit v1.2.3