fix trailing comma in hyprctl activewindow

This commit is contained in:
Vaxry 2022-11-13 11:12:04 +00:00
parent 2cbb10d850
commit 5a00f0c657

View file

@ -182,7 +182,13 @@ std::string activeWindowRequest(HyprCtl::eHyprCtlOutputFormat format) {
if (!g_pCompositor->windowValidMapped(PWINDOW)) if (!g_pCompositor->windowValidMapped(PWINDOW))
return format == HyprCtl::FORMAT_JSON ? "{}" : "Invalid"; 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) { std::string layersRequest(HyprCtl::eHyprCtlOutputFormat format) {