summaryrefslogtreecommitdiff
path: root/src/debug/HyprCtl.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-02-23 21:25:04 +0000
committerVaxry <vaxry@vaxry.net>2024-02-23 21:25:04 +0000
commitbdbd8d965d4f1a13129c72505bb556445ce0bc90 (patch)
tree36f2da95a1ffe5cd4035f71551a72c197d97b140 /src/debug/HyprCtl.cpp
parentbfb1e876a87d80256f7c29d24cbda704c5eefaa1 (diff)
hyprctl: jsonify new gaps
fixes #4820
Diffstat (limited to 'src/debug/HyprCtl.cpp')
-rw-r--r--src/debug/HyprCtl.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp
index c77e5e50..842a5ce6 100644
--- a/src/debug/HyprCtl.cpp
+++ b/src/debug/HyprCtl.cpp
@@ -249,10 +249,11 @@ static std::string getWorkspaceRuleData(const SWorkspaceRule& r, eHyprCtlOutputF
const std::string monitor = r.monitor.empty() ? "" : std::format(",\n \"monitor\": \"{}\"", escapeJSONStrings(r.monitor));
const std::string default_ = (bool)(r.isDefault) ? std::format(",\n \"default\": {}", boolToString(r.isDefault)) : "";
const std::string persistent = (bool)(r.isPersistent) ? std::format(",\n \"persistent\": {}", boolToString(r.isPersistent)) : "";
- const std::string gapsIn =
- (bool)(r.gapsIn) ? std::format(",\n \"gapsIn\": {} {} {} {}", r.gapsIn.value().top, r.gapsIn.value().right, r.gapsIn.value().bottom, r.gapsIn.value().left) : "";
+ const std::string gapsIn = (bool)(r.gapsIn) ?
+ std::format(",\n \"gapsIn\": [{}, {}, {}, {}]", r.gapsIn.value().top, r.gapsIn.value().right, r.gapsIn.value().bottom, r.gapsIn.value().left) :
+ "";
const std::string gapsOut = (bool)(r.gapsOut) ?
- std::format(",\n \"gapsOut\": {} {} {} {}", r.gapsOut.value().top, r.gapsOut.value().right, r.gapsOut.value().bottom, r.gapsOut.value().left) :
+ std::format(",\n \"gapsOut\": [{}, {}, {}, {}]", r.gapsOut.value().top, r.gapsOut.value().right, r.gapsOut.value().bottom, r.gapsOut.value().left) :
"";
const std::string borderSize = (bool)(r.borderSize) ? std::format(",\n \"borderSize\": {}", r.borderSize.value()) : "";
const std::string border = (bool)(r.border) ? std::format(",\n \"border\": {}", boolToString(r.border.value())) : "";