From 409b56f6a367735e7b12889bdfac588f74d160c0 Mon Sep 17 00:00:00 2001 From: boundlessvoid0 Date: Wed, 16 Jul 2025 21:35:15 +0200 Subject: hyprctl: make animations print details about bezier curves (#10413) (#10871) --- src/debug/HyprCtl.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/debug/HyprCtl.cpp') diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index eb908e1d..cbc8c641 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -786,7 +786,9 @@ static std::string animationsRequest(eHyprCtlOutputFormat format, std::string re ret += "beziers:\n"; for (auto const& bz : g_pAnimationManager->getAllBeziers()) { - ret += std::format("\n\tname: {}\n", bz.first); + auto& controlPoints = bz.second->getControlPoints(); + ret += std::format("\n\tname: {}\n\t\tX0: {:.2f}\n\t\tY0: {:.2f}\n\t\tX1: {:.2f}\n\t\tY1: {:.2f}", bz.first, controlPoints[1].x, controlPoints[1].y, controlPoints[2].x, + controlPoints[2].y); } } else { // json @@ -811,11 +813,16 @@ static std::string animationsRequest(eHyprCtlOutputFormat format, std::string re ret += ",\n["; for (auto const& bz : g_pAnimationManager->getAllBeziers()) { + auto& controlPoints = bz.second->getControlPoints(); ret += std::format(R"#( {{ - "name": "{}" + "name": "{}", + "X0": {:.2f}, + "Y0": {:.2f}, + "X1": {:.2f}, + "Y1": {:.2f} }},)#", - escapeJSONStrings(bz.first)); + escapeJSONStrings(bz.first), controlPoints[1].x, controlPoints[1].y, controlPoints[2].x, controlPoints[2].y); } trimTrailingComma(ret); -- cgit v1.2.3