diff options
author | vaxerski <[email protected]> | 2023-01-09 14:35:53 +0100 |
---|---|---|
committer | vaxerski <[email protected]> | 2023-01-09 14:35:58 +0100 |
commit | ff118834829dd0db37e3622480756776b368bd4a (patch) | |
tree | c2d8a3b9ee8a88ed182d7299dce8659eed43d37e | |
parent | c0c7c12bb907ea8cdc6e17653cddb3691102beac (diff) | |
download | Hyprland-ff118834829dd0db37e3622480756776b368bd4a.tar.gz Hyprland-ff118834829dd0db37e3622480756776b368bd4a.zip |
added make model and serial to hyprctl monitors
-rw-r--r-- | src/debug/HyprCtl.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index 3223ac89..4d51a796 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -24,6 +24,9 @@ std::string monitorsRequest(HyprCtl::eHyprCtlOutputFormat format) { "id": %i, "name": "%s", "description": "%s", + "make": "%s", + "model": "%s", + "serial": "%s", "width": %i, "height": %i, "refreshRate": %f, @@ -39,7 +42,8 @@ std::string monitorsRequest(HyprCtl::eHyprCtlOutputFormat format) { "focused": %s, "dpmsStatus": %s },)#", - m->ID, escapeJSONStrings(m->szName).c_str(), escapeJSONStrings(m->output->description ? m->output->description : "").c_str(), (int)m->vecPixelSize.x, + m->ID, escapeJSONStrings(m->szName).c_str(), escapeJSONStrings(m->output->description ? m->output->description : "").c_str(), + (m->output->make ? m->output->make : ""), (m->output->model ? m->output->model : ""), (m->output->serial ? m->output->serial : ""), (int)m->vecPixelSize.x, (int)m->vecPixelSize.y, m->refreshRate, (int)m->vecPosition.x, (int)m->vecPosition.y, m->activeWorkspace, escapeJSONStrings(g_pCompositor->getWorkspaceByID(m->activeWorkspace)->m_szName).c_str(), (int)m->vecReservedTopLeft.x, (int)m->vecReservedTopLeft.y, (int)m->vecReservedBottomRight.x, (int)m->vecReservedBottomRight.y, m->scale, (int)m->transform, (m.get() == g_pCompositor->m_pLastMonitor ? "true" : "false"), @@ -52,10 +56,12 @@ std::string monitorsRequest(HyprCtl::eHyprCtlOutputFormat format) { result += "]"; } else { for (auto& m : g_pCompositor->m_vMonitors) { - result += getFormat("Monitor %s (ID %i):\n\t%ix%i@%f at %ix%i\n\tdescription: %s\n\tactive workspace: %i (%s)\n\treserved: %i %i %i %i\n\tscale: %.2f\n\ttransform: " + result += getFormat("Monitor %s (ID %i):\n\t%ix%i@%f at %ix%i\n\tdescription: %s\n\tmake: %s\n\tmodel: %s\n\tserial: %s\n\tactive workspace: %i (%s)\n\treserved: %i " + "%i %i %i\n\tscale: %.2f\n\ttransform: " "%i\n\tfocused: %s\n\tdpmsStatus: %i\n\n", m->szName.c_str(), m->ID, (int)m->vecPixelSize.x, (int)m->vecPixelSize.y, m->refreshRate, (int)m->vecPosition.x, (int)m->vecPosition.y, - (m->output->description ? m->output->description : ""), m->activeWorkspace, g_pCompositor->getWorkspaceByID(m->activeWorkspace)->m_szName.c_str(), + (m->output->description ? m->output->description : ""), (m->output->make ? m->output->make : ""), (m->output->model ? m->output->model : ""), + (m->output->serial ? m->output->serial : ""), m->activeWorkspace, g_pCompositor->getWorkspaceByID(m->activeWorkspace)->m_szName.c_str(), (int)m->vecReservedTopLeft.x, (int)m->vecReservedTopLeft.y, (int)m->vecReservedBottomRight.x, (int)m->vecReservedBottomRight.y, m->scale, (int)m->transform, (m.get() == g_pCompositor->m_pLastMonitor ? "yes" : "no"), (int)m->dpmsStatus); } |