diff options
| author | vaxerski <vaxry@vaxry.net> | 2022-11-13 11:12:04 +0000 |
|---|---|---|
| committer | vaxerski <vaxry@vaxry.net> | 2022-11-13 11:12:11 +0000 |
| commit | 5a00f0c657fbfca0ab4fbd5f388042d6084a5997 (patch) | |
| tree | 0a7137a8ec5f9a4a6baa430dbe3ebc687d33e4da /src/debug/HyprCtl.cpp | |
| parent | 2cbb10d850f0860fcb1c940ebc047c7c4deb9e91 (diff) | |
fix trailing comma in hyprctl activewindow
Diffstat (limited to 'src/debug/HyprCtl.cpp')
| -rw-r--r-- | src/debug/HyprCtl.cpp | 8 |
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) { |
