Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • This works well if I know what the monitor names are. Unfortunately I disconnect different monitors with different connection types, so what will be 'DVI-1' one day will be 'USB-0-1' another day... which makes this solution not as effective. Thanks all the same :) Commented Nov 22, 2017 at 20:06
  • So then parse the output of xrandr to get what the active displays are. It's a computer, make it do what it's good at. Commented Nov 22, 2017 at 20:07
  • Yep, that would work as well. I'm too lazy, but I learned a lot about xrandr from investigating your answer, so thanks a bunch. Commented Nov 22, 2017 at 20:11