summaryrefslogtreecommitdiff
path: root/src/debug/HyprCtl.cpp
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2022-11-13 11:12:04 +0000
committervaxerski <vaxry@vaxry.net>2022-11-13 11:12:11 +0000
commit5a00f0c657fbfca0ab4fbd5f388042d6084a5997 (patch)
tree0a7137a8ec5f9a4a6baa430dbe3ebc687d33e4da /src/debug/HyprCtl.cpp
parent2cbb10d850f0860fcb1c940ebc047c7c4deb9e91 (diff)
fix trailing comma in hyprctl activewindow
Diffstat (limited to 'src/debug/HyprCtl.cpp')
-rw-r--r--src/debug/HyprCtl.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp
index df9d5f33..265d1aed 100644
--- a/src/debug/HyprCtl.cpp
+++ b/src/debug/HyprCtl.cpp
@@ -182,7 +182,13 @@ std::string activeWindowRequest(HyprCtl::eHyprCtlOutputFormat format) {
if (!g_pCompositor->windowValidMapped(PWINDOW))
return format == HyprCtl::FORMAT_JSON ? "{}" : "Invalid";
- return getWindowData(PWINDOW, format);
+
+ auto result = getWindowData(PWINDOW, format);
+
+ if (format == HyprCtl::FORMAT_JSON)
+ result.pop_back();
+
+ return result;
}
std::string layersRequest(HyprCtl::eHyprCtlOutputFormat format) {