From c2670e9ab90bd657e87a1da2c5322e9007dce01f Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Mon, 17 Nov 2025 18:34:02 +0000 Subject: windowrules: rewrite completely (#12269) Reworks the window rule syntax completely --------- Co-authored-by: Mihai Fufezan --- src/desktop/Rule.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 src/desktop/Rule.cpp (limited to 'src/desktop/Rule.cpp') diff --git a/src/desktop/Rule.cpp b/src/desktop/Rule.cpp deleted file mode 100644 index 93f38de0..00000000 --- a/src/desktop/Rule.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include -#include "../helpers/memory/Memory.hpp" -#include "Rule.hpp" -#include "../debug/Log.hpp" - -CRuleRegexContainer::CRuleRegexContainer(const std::string& regex_) { - const bool NEGATIVE = regex_.starts_with("negative:"); - - m_negative = NEGATIVE; - m_regex = makeUnique(NEGATIVE ? regex_.substr(9) : regex_); - - // TODO: maybe pop an error? - if (!m_regex->ok()) - Debug::log(ERR, "RuleRegexContainer: regex {} failed to parse!", regex_); -} - -bool CRuleRegexContainer::passes(const std::string& str) const { - if (!m_regex) - return false; - - return RE2::FullMatch(str, *m_regex) != m_negative; -} \ No newline at end of file -- cgit v1.2.3