From 2c7b2ad6ca19950f13ec4a97204bb8ff18096bb3 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Tue, 18 Jul 2023 00:11:29 +0200 Subject: windowrules: add border size rule --- src/Window.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Window.cpp') 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) { -- cgit v1.2.3