Add tool for pretty printing org.gnome.Mutter.DisplayConfig.GetCurrentState
Looking at the output of gdbus call -e -d org.gnome.Mutter.DisplayConfig -o /org/gnome/Mutter/DisplayConfig -m org.gnome.Mutter.DisplayConfig.GetCurrentState
is awful, but sometimes necessary, to debug issues, e.g. from bug reports.
This added tool takes the output from that command and turns it into something that could for example look like this (somewhat visually inspired by drm_info):
Serial: 29
Monitors:
├──Monitor DP-8
│ ├──EDID: vendor: DEL, product: DELL UP2718Q, serial: 73K0275ACKEL
│ ├──Modes (32)
│ │ ├──3840x2160@60
│ │ │ ├──Dimension: 3840x2160
│ │ │ ├──Refresh rate: 60.0
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0, 2.0, 3.0, 4.0]
│ │ │ └──Properties: (2)
│ │ │ ├──is-current ⇒ True
│ │ │ └──is-preferred ⇒ True
│ │ ├──3840x2160@59.940101623535156
│ │ │ ├──Dimension: 3840x2160
│ │ │ ├──Refresh rate: 59.940101623535156
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0, 2.0, 3.0, 4.0]
│ │ │ └──Properties: (0)
│ │ ├──3840x2160@50
│ │ │ ├──Dimension: 3840x2160
│ │ │ ├──Refresh rate: 50.0
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0, 2.0, 3.0, 4.0]
│ │ │ └──Properties: (0)
│ │ ├──3840x2160@30
│ │ │ ├──Dimension: 3840x2160
│ │ │ ├──Refresh rate: 30.0
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0, 2.0, 3.0, 4.0]
│ │ │ └──Properties: (0)
│ │ ├──3840x2160@29.969999313354492
│ │ │ ├──Dimension: 3840x2160
│ │ │ ├──Refresh rate: 29.969999313354492
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0, 2.0, 3.0, 4.0]
│ │ │ └──Properties: (0)
│ │ ├──3840x2160@25
│ │ │ ├──Dimension: 3840x2160
│ │ │ ├──Refresh rate: 25.0
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0, 2.0, 3.0, 4.0]
│ │ │ └──Properties: (0)
│ │ ├──3840x2160@24
│ │ │ ├──Dimension: 3840x2160
│ │ │ ├──Refresh rate: 24.0
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0, 2.0, 3.0, 4.0]
│ │ │ └──Properties: (0)
│ │ ├──3840x2160@23.97599983215332
│ │ │ ├──Dimension: 3840x2160
│ │ │ ├──Refresh rate: 23.97599983215332
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0, 2.0, 3.0, 4.0]
│ │ │ └──Properties: (0)
│ │ ├──2560x1440@59.950550079345703
│ │ │ ├──Dimension: 2560x1440
│ │ │ ├──Refresh rate: 59.9505500793457
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0, 2.0, 3.0]
│ │ │ └──Properties: (0)
│ │ ├──2048x1280@60.196468353271484
│ │ │ ├──Dimension: 2048x1280
│ │ │ ├──Refresh rate: 60.196468353271484
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0, 2.0]
│ │ │ └──Properties: (0)
│ │ ├──2048x1152@60
│ │ │ ├──Dimension: 2048x1152
│ │ │ ├──Refresh rate: 60.0
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0, 2.0]
│ │ │ └──Properties: (0)
│ │ ├──2048x1080@23.996618270874023
│ │ │ ├──Dimension: 2048x1080
│ │ │ ├──Refresh rate: 23.996618270874023
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0, 2.0]
│ │ │ └──Properties: (0)
│ │ ├──1920x1200@59.950172424316406
│ │ │ ├──Dimension: 1920x1200
│ │ │ ├──Refresh rate: 59.950172424316406
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0, 2.0]
│ │ │ └──Properties: (0)
│ │ ├──1920x1080@60
│ │ │ ├──Dimension: 1920x1080
│ │ │ ├──Refresh rate: 60.0
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0, 2.0]
│ │ │ └──Properties: (0)
│ │ ├──1920x1080@59.940200805664062
│ │ │ ├──Dimension: 1920x1080
│ │ │ ├──Refresh rate: 59.94020080566406
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0, 2.0]
│ │ │ └──Properties: (0)
│ │ ├──1920x1080@50
│ │ │ ├──Dimension: 1920x1080
│ │ │ ├──Refresh rate: 50.0
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0, 2.0]
│ │ │ └──Properties: (0)
│ │ ├──1920x1080@24
│ │ │ ├──Dimension: 1920x1080
│ │ │ ├──Refresh rate: 24.0
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0, 2.0]
│ │ │ └──Properties: (0)
│ │ ├──1920x1080@23.976079940795898
│ │ │ ├──Dimension: 1920x1080
│ │ │ ├──Refresh rate: 23.9760799407959
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0, 2.0]
│ │ │ └──Properties: (0)
│ │ ├──1680x1050@59.883251190185547
│ │ │ ├──Dimension: 1680x1050
│ │ │ ├──Refresh rate: 59.88325119018555
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0, 2.0]
│ │ │ └──Properties: (0)
│ │ ├──1600x1200@60
│ │ │ ├──Dimension: 1600x1200
│ │ │ ├──Refresh rate: 60.0
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0, 2.0]
│ │ │ └──Properties: (0)
│ │ ├──1280x1024@75.024673461914062
│ │ │ ├──Dimension: 1280x1024
│ │ │ ├──Refresh rate: 75.02467346191406
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0]
│ │ │ └──Properties: (0)
│ │ ├──1280x1024@60.019741058349609
│ │ │ ├──Dimension: 1280x1024
│ │ │ ├──Refresh rate: 60.01974105834961
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0]
│ │ │ └──Properties: (0)
│ │ ├──1280x800@59.9095458984375
│ │ │ ├──Dimension: 1280x800
│ │ │ ├──Refresh rate: 59.9095458984375
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0]
│ │ │ └──Properties: (0)
│ │ ├──1280x720@60
│ │ │ ├──Dimension: 1280x720
│ │ │ ├──Refresh rate: 60.0
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0]
│ │ │ └──Properties: (0)
│ │ ├──1280x720@59.940200805664062
│ │ │ ├──Dimension: 1280x720
│ │ │ ├──Refresh rate: 59.94020080566406
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0]
│ │ │ └──Properties: (0)
│ │ ├──1280x720@50
│ │ │ ├──Dimension: 1280x720
│ │ │ ├──Refresh rate: 50.0
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0]
│ │ │ └──Properties: (0)
│ │ ├──1152x864@75
│ │ │ ├──Dimension: 1152x864
│ │ │ ├──Refresh rate: 75.0
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0]
│ │ │ └──Properties: (0)
│ │ ├──1024x768@75.028579711914062
│ │ │ ├──Dimension: 1024x768
│ │ │ ├──Refresh rate: 75.02857971191406
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0]
│ │ │ └──Properties: (0)
│ │ ├──1024x768@60.003841400146484
│ │ │ ├──Dimension: 1024x768
│ │ │ ├──Refresh rate: 60.003841400146484
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0]
│ │ │ └──Properties: (0)
│ │ ├──800x600@75
│ │ │ ├──Dimension: 800x600
│ │ │ ├──Refresh rate: 75.0
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0]
│ │ │ └──Properties: (0)
│ │ ├──800x600@60.316539764404297
│ │ │ ├──Dimension: 800x600
│ │ │ ├──Refresh rate: 60.3165397644043
│ │ │ ├──Preferred scale: 1.0
│ │ │ ├──Supported scales: [1.0]
│ │ │ └──Properties: (0)
│ │ └──720x576@50
│ │ ├──Dimension: 720x576
│ │ ├──Refresh rate: 50.0
│ │ ├──Preferred scale: 1.0
│ │ ├──Supported scales: [1.0]
│ │ └──Properties: (0)
│ └──Properties: (2)
│ ├──is-builtin ⇒ False
│ └──display-name ⇒ Dell Inc. 27"
└──Monitor eDP-1
├──EDID: vendor: CSO, product: 0x1403, serial: 0x00000000
├──Modes (24)
│ ├──3840x2400@60
│ │ ├──Dimension: 3840x2400
│ │ ├──Refresh rate: 60.0
│ │ ├──Preferred scale: 2.0
│ │ ├──Supported scales: [1.0, 2.0, 3.0, 4.0]
│ │ └──Properties: (1)
│ │ └──is-preferred ⇒ True
│ ├──3840x2160@59.980926513671875
│ │ ├──Dimension: 3840x2160
│ │ ├──Refresh rate: 59.980926513671875
│ │ ├──Preferred scale: 2.0
│ │ ├──Supported scales: [1.0, 2.0, 3.0, 4.0]
│ │ └──Properties: (0)
│ ├──3200x1800@59.956130981445312
│ │ ├──Dimension: 3200x1800
│ │ ├──Refresh rate: 59.95613098144531
│ │ ├──Preferred scale: 2.0
│ │ ├──Supported scales: [1.0, 2.0, 3.0]
│ │ └──Properties: (0)
│ ├──2880x1620@59.960258483886719
│ │ ├──Dimension: 2880x1620
│ │ ├──Refresh rate: 59.96025848388672
│ │ ├──Preferred scale: 2.0
│ │ ├──Supported scales: [1.0, 2.0, 3.0]
│ │ └──Properties: (0)
│ ├──2560x1600@59.986587524414062
│ │ ├──Dimension: 2560x1600
│ │ ├──Refresh rate: 59.98658752441406
│ │ ├──Preferred scale: 2.0
│ │ ├──Supported scales: [1.0, 2.0, 3.0]
│ │ └──Properties: (0)
│ ├──2560x1440@59.960628509521484
│ │ ├──Dimension: 2560x1440
│ │ ├──Refresh rate: 59.960628509521484
│ │ ├──Preferred scale: 2.0
│ │ ├──Supported scales: [1.0, 2.0, 3.0]
│ │ └──Properties: (0)
│ ├──2048x1536@59.953784942626953
│ │ ├──Dimension: 2048x1536
│ │ ├──Refresh rate: 59.95378494262695
│ │ ├──Preferred scale: 1.0
│ │ ├──Supported scales: [1.0, 2.0]
│ │ └──Properties: (0)
│ ├──2048x1152@59.903182983398438
│ │ ├──Dimension: 2048x1152
│ │ ├──Refresh rate: 59.90318298339844
│ │ ├──Preferred scale: 1.0
│ │ ├──Supported scales: [1.0, 2.0]
│ │ └──Properties: (0)
│ ├──1920x1440@59.967990875244141
│ │ ├──Dimension: 1920x1440
│ │ ├──Refresh rate: 59.96799087524414
│ │ ├──Preferred scale: 1.0
│ │ ├──Supported scales: [1.0, 2.0]
│ │ └──Properties: (0)
│ ├──1920x1200@59.884601593017578
│ │ ├──Dimension: 1920x1200
│ │ ├──Refresh rate: 59.88460159301758
│ │ ├──Preferred scale: 1.0
│ │ ├──Supported scales: [1.0, 2.0]
│ │ └──Properties: (0)
│ ├──1920x1080@59.962844848632812
│ │ ├──Dimension: 1920x1080
│ │ ├──Refresh rate: 59.96284484863281
│ │ ├──Preferred scale: 1.0
│ │ ├──Supported scales: [1.0, 2.0]
│ │ └──Properties: (0)
│ ├──1680x1050@59.954250335693359
│ │ ├──Dimension: 1680x1050
│ │ ├──Refresh rate: 59.95425033569336
│ │ ├──Preferred scale: 1.0
│ │ ├──Supported scales: [1.0, 2.0]
│ │ └──Properties: (0)
│ ├──1600x1200@59.869106292724609
│ │ ├──Dimension: 1600x1200
│ │ ├──Refresh rate: 59.86910629272461
│ │ ├──Preferred scale: 1.0
│ │ ├──Supported scales: [1.0, 2.0]
│ │ └──Properties: (0)
│ ├──1600x900@59.946022033691406
│ │ ├──Dimension: 1600x900
│ │ ├──Refresh rate: 59.946022033691406
│ │ ├──Preferred scale: 1.0
│ │ ├──Supported scales: [1.0]
│ │ └──Properties: (0)
│ ├──1440x1080@59.988838195800781
│ │ ├──Dimension: 1440x1080
│ │ ├──Refresh rate: 59.98883819580078
│ │ ├──Preferred scale: 1.0
│ │ ├──Supported scales: [1.0, 2.0]
│ │ └──Properties: (0)
│ ├──1440x900@59.887443542480469
│ │ ├──Dimension: 1440x900
│ │ ├──Refresh rate: 59.88744354248047
│ │ ├──Preferred scale: 1.0
│ │ ├──Supported scales: [1.0]
│ │ └──Properties: (0)
│ ├──1400x1050@59.978443145751953
│ │ ├──Dimension: 1400x1050
│ │ ├──Refresh rate: 59.97844314575195
│ │ ├──Preferred scale: 1.0
│ │ ├──Supported scales: [1.0]
│ │ └──Properties: (0)
│ ├──1368x768@59.882049560546875
│ │ ├──Dimension: 1368x768
│ │ ├──Refresh rate: 59.882049560546875
│ │ ├──Preferred scale: 1.0
│ │ ├──Supported scales: [1.0]
│ │ └──Properties: (0)
│ ├──1280x960@59.939048767089844
│ │ ├──Dimension: 1280x960
│ │ ├──Refresh rate: 59.939048767089844
│ │ ├──Preferred scale: 1.0
│ │ ├──Supported scales: [1.0]
│ │ └──Properties: (0)
│ ├──1280x800@59.810325622558594
│ │ ├──Dimension: 1280x800
│ │ ├──Refresh rate: 59.810325622558594
│ │ ├──Preferred scale: 1.0
│ │ ├──Supported scales: [1.0]
│ │ └──Properties: (0)
│ ├──1280x720@59.855125427246094
│ │ ├──Dimension: 1280x720
│ │ ├──Refresh rate: 59.855125427246094
│ │ ├──Preferred scale: 1.0
│ │ ├──Supported scales: [1.0]
│ │ └──Properties: (0)
│ ├──1152x864@59.958633422851562
│ │ ├──Dimension: 1152x864
│ │ ├──Refresh rate: 59.95863342285156
│ │ ├──Preferred scale: 1.0
│ │ ├──Supported scales: [1.0]
│ │ └──Properties: (0)
│ ├──1024x768@59.920131683349609
│ │ ├──Dimension: 1024x768
│ │ ├──Refresh rate: 59.92013168334961
│ │ ├──Preferred scale: 1.0
│ │ ├──Supported scales: [1.0]
│ │ └──Properties: (0)
│ └──800x600@59.861404418945312
│ ├──Dimension: 800x600
│ ├──Refresh rate: 59.86140441894531
│ ├──Preferred scale: 1.0
│ ├──Supported scales: [1.0]
│ └──Properties: (0)
└──Properties: (2)
├──is-builtin ⇒ True
└──display-name ⇒ Built-in display
Logical monitors:
└──Logical monitor #1
├──Position: (0, 0)
├──Scale: 2.0
├──Transform: normal
├──Primary: True
├──Monitors: (1)
│ └──DP-8 (DEL, DELL UP2718Q, 73K0275ACKEL)
└──Properties: (0)
Properties: (2)
├──"layout-mode" ⇒ 2
└──"legacy-ui-scaling-factor" ⇒ 2
Marked as draft as it includes !2434 (merged).