diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-12-21 23:07:23 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-12-21 23:07:34 +0000 |
| commit | 31422ae25dee33dd000798b64a80bd7fd08d2ece (patch) | |
| tree | 43c71511f09159b716435bf6abb4deaaadd0b49a /src/desktop/Rule.hpp | |
| parent | 57921d7dbd1b87a9474f609cb9cd30e6174027cd (diff) | |
windowrules: add negative: prefix for negating a regex
fixes #8799
Diffstat (limited to 'src/desktop/Rule.hpp')
| -rw-r--r-- | src/desktop/Rule.hpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/desktop/Rule.hpp b/src/desktop/Rule.hpp new file mode 100644 index 00000000..4b178ee8 --- /dev/null +++ b/src/desktop/Rule.hpp @@ -0,0 +1,21 @@ +#pragma once + +#include <memory> + +//NOLINTNEXTLINE +namespace re2 { + class RE2; +}; + +class CRuleRegexContainer { + public: + CRuleRegexContainer() = default; + + CRuleRegexContainer(const std::string& regex); + + bool passes(const std::string& str) const; + + private: + std::unique_ptr<re2::RE2> regex; + bool negative = false; +};
\ No newline at end of file |
