aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2023-03-16 00:18:39 +0000
committervaxerski <[email protected]>2023-03-16 00:18:44 +0000
commitcee7f11d8b785356c598726809589b385f139dbf (patch)
tree5786c2e5f8e4e3c833a5de1de6cb8d56cf018b12
parent1c67849bf13582e6757e79e32b2f77832cca6ed7 (diff)
downloadHyprland-cee7f11d8b785356c598726809589b385f139dbf.tar.gz
Hyprland-cee7f11d8b785356c598726809589b385f139dbf.zip
hyprctl: ignore null output monitors
-rw-r--r--src/debug/HyprCtl.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp
index 0adfb897..74dd7a15 100644
--- a/src/debug/HyprCtl.cpp
+++ b/src/debug/HyprCtl.cpp
@@ -20,6 +20,9 @@ std::string monitorsRequest(HyprCtl::eHyprCtlOutputFormat format) {
result += "[";
for (auto& m : g_pCompositor->m_vMonitors) {
+ if (!m->output)
+ continue;
+
result += getFormat(
R"#({
"id": %i,
@@ -58,6 +61,9 @@ std::string monitorsRequest(HyprCtl::eHyprCtlOutputFormat format) {
result += "]";
} else {
for (auto& m : g_pCompositor->m_vMonitors) {
+ if (!m->output)
+ continue;
+
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\tvrr: %i\n\n",