diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-07-18 00:11:29 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-07-18 00:11:29 +0200 |
| commit | 2c7b2ad6ca19950f13ec4a97204bb8ff18096bb3 (patch) | |
| tree | 9bf7f1862e4ecc2f84d5d3ac1807540b74538be1 /src/Window.cpp | |
| parent | ddb8c897762d47a22867c77897c6e39513e36029 (diff) | |
windowrules: add border size rule
Diffstat (limited to 'src/Window.cpp')
| -rw-r--r-- | src/Window.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Window.cpp b/src/Window.cpp index eacce1e1..7e7dce52 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -477,6 +477,10 @@ void CWindow::applyDynamicRule(const SWindowRule& r) { try { m_sAdditionalConfigData.rounding = std::stoi(r.szRule.substr(r.szRule.find_first_of(' ') + 1)); } catch (std::exception& e) { Debug::log(ERR, "Rounding rule \"%s\" failed with: %s", r.szRule.c_str(), e.what()); } + } else if (r.szRule.find("bordersize") == 0) { + try { + m_sAdditionalConfigData.borderSize = std::stoi(r.szRule.substr(r.szRule.find_first_of(' ') + 1)); + } catch (std::exception& e) { Debug::log(ERR, "Bordersize rule \"%s\" failed with: %s", r.szRule.c_str(), e.what()); } } else if (r.szRule.find("opacity") == 0) { try { CVarList vars(r.szRule, 0, ' '); @@ -536,6 +540,7 @@ void CWindow::updateDynamicRules() { m_sAdditionalConfigData.rounding = -1; m_sAdditionalConfigData.dimAround = false; m_sAdditionalConfigData.forceRGBX = false; + m_sAdditionalConfigData.borderSize = -1; const auto WINDOWRULES = g_pConfigManager->getMatchingRules(this); for (auto& r : WINDOWRULES) { |
