From df956a0f6fbcfd7397b2d7b86883c0936c7795ec Mon Sep 17 00:00:00 2001 From: Mike Will Date: Fri, 6 Dec 2024 01:16:58 -0500 Subject: windowrules: add rules for mouse and touchpad scroll factors (#8655) --- src/managers/KeybindManager.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/managers/KeybindManager.cpp') diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 2eb04d41..67c2c5d0 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -3014,6 +3014,13 @@ SDispatchResult CKeybindManager::setProp(std::string args) { search->second(PWINDOW)->unset(PRIORITY_SET_PROP); else if (const auto V = configStringToInt(VAL); V) *(search->second(PWINDOW)) = CWindowOverridableVar((int)*V, PRIORITY_SET_PROP); + } else if (auto search = g_pConfigManager->mfWindowProperties.find(PROP); search != g_pConfigManager->mfWindowProperties.end()) { + if (VAL == "unset") + search->second(PWINDOW)->unset(PRIORITY_SET_PROP); + else { + const auto V = std::stof(VAL); + *(search->second(PWINDOW)) = CWindowOverridableVar(V, PRIORITY_SET_PROP); + } } else return {.success = false, .error = "Prop not found"}; } catch (std::exception& e) { return {.success = false, .error = std::format("Error parsing prop value: {}", std::string(e.what()))}; } -- cgit v1.2.3