From 34396f55a283e5fe332ed7e1b8fd814840808ae5 Mon Sep 17 00:00:00 2001 From: thejch <66577496+thejch@users.noreply.github.com> Date: Fri, 12 Apr 2024 17:54:18 -0700 Subject: [PATCH] master: change the mfact dispatcher to use splitratio (#4766) * master layout: change the mfact dispatcher to use splitratio * add space for concat --- src/layout/MasterLayout.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp index e2b8270d..0999303f 100644 --- a/src/layout/MasterLayout.cpp +++ b/src/layout/MasterLayout.cpp @@ -1285,19 +1285,7 @@ std::any CHyprMasterLayout::layoutMessage(SLayoutMessageHeader header, std::stri } else if (command == "orientationcycle") { runOrientationCycle(header, &vars, 1); } else if (command == "mfact") { - if (vars.size() >= 2) { - float newMfact = 0; - try { - newMfact = std::stof(vars[1]); - } catch (std::exception& e) { - Debug::log(ERR, "Argument is invalid: {}", e.what()); - return 0; - } - for (auto& nd : m_lMasterNodesData) { - if (nd.isMaster) - nd.percMaster = std::clamp(newMfact, 0.05f, 0.95f); - } - } + g_pKeybindManager->m_mDispatchers["splitratio"](vars[1] + " " + vars[2]); } else if (command == "rollnext") { const auto PWINDOW = header.pWindow; const auto PNODE = getNodeFromWindow(PWINDOW);