3
0
mirror of https://github.com/hyprwm/Hyprland.git synced 2026-03-07 15:54:46 +00:00

windowrules: add rules for mouse and touchpad scroll factors (#8655)

This commit is contained in:
Mike Will
2024-12-06 01:16:58 -05:00
committed by Vaxry
parent 33f271c29a
commit df956a0f6f
6 changed files with 40 additions and 4 deletions

View File

@ -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()))}; }