rules: add layer and window xray rules

This commit is contained in:
vaxerski
2023-08-09 22:03:24 +02:00
parent fe9453c643
commit cbb899740c
8 changed files with 65 additions and 11 deletions

View File

@@ -12,6 +12,7 @@ void SLayerSurface::applyRules() {
forceBlur = false;
ignoreAlpha = false;
ignoreAlphaValue = 0.f;
xray = -1;
for (auto& rule : g_pConfigManager->getMatchingRules(this)) {
if (rule.rule == "noanim")
@@ -29,6 +30,11 @@ void SLayerSurface::applyRules() {
if (!alphaValue.empty())
ignoreAlphaValue = std::stof(alphaValue);
} catch (...) { Debug::log(ERR, "Invalid value passed to ignoreAlpha"); }
} else if (rule.rule.find("xray") == 0) {
CVarList vars{rule.rule, 0, ' '};
try {
xray = configStringToInt(vars[1]);
} catch (...) {}
}
}
}