#pragma once #include "../Rule.hpp" #include "../../DesktopTypes.hpp" #include "WindowRuleEffectContainer.hpp" #include "../../../helpers/math/Math.hpp" #include namespace Desktop::Rule { constexpr const char* EXEC_RULE_ENV_NAME = "HL_EXEC_RULE_TOKEN"; class CWindowRule : public IRule { private: using storageType = CWindowRuleEffectContainer::storageType; public: CWindowRule(const std::string& name = ""); virtual ~CWindowRule() = default; static SP buildFromExecString(std::string&&); virtual eRuleType type(); void addEffect(storageType e, const std::string& result); const std::vector>& effects(); const std::unordered_set& effectsSet(); bool matches(PHLWINDOW w, bool allowEnvLookup = false); private: std::vector> m_effects; std::unordered_set m_effectSet; }; };