Skip to content

Get Monitors

Mihir Lad edited this page Jul 17, 2020 · 7 revisions

Get Monitors

This message type is used to retrieve the properties of your monitors. The payload of this message type is not used/needed. The order of the monitors is not guaranteed to be in any particular order. Do not assume the "num" value is associated with the monitor's index in the array. You will receive a message similar to this:

[
  {
    "master_factor": 0.55000001192092895508,
    "num_master": 1,
    "num": 0,
    "is_selected": true,
    "monitor_geometry": {
      "x": 0,
      "y": 0,
      "width": 1920,
      "height": 1080
    },
    "window_geometry": {
      "x": 0,
      "y": 36,
      "width": 1920,
      "height": 1044
    },
    "tagset": {
      "current": 1,
      "old": 0
    },
    "tag_state": {
      "selected": 1,
      "occupied": 5,
      "urgent": 0
    },
    "clients": {
      "selected": 54525966,
      "stack": [
        54525966,
        54525953
      ],
      "all": [
        54525953
      ]
    },
    "layout": {
      "symbol": {
        "current": "[]=",
        "old": "[]="
      },
      "address": {
        "current": 94559310858912,
        "old": 94559310858928
      }
    },
    "bar": {
      "y": 0,
      "is_shown": true,
      "is_top": true,
      "window_id": 4194317
    }
  },
  {
    ...
  }
]