mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-06 23:21:57 -07:00
rules: add layer and window xray rules
This commit is contained in:
@@ -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 (...) {}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user