Thank you for the suggestion. x-on-resize compiles and runs fine. It notices
resizes, which I suspect I'll find useful down the road :) But, unfortunately,
it doesn't notice when I plug/unplug my VGA monitor.
I think I'll fall back to Plan B: map the F7 key to trigger a script which will
run xrandr and switch displays to match what's plugged in. It's a little less
magical, but it should get the job done and it avoids interrupting my audio
every 5 seconds, since I'll only run xrandr when I'm trying to switch displays.
On 03/01, David Coppa wrote:
On Wed, Mar 1, 2017 at 11:49 AM, Raf Czlonka <rczlo...@gmail.com> wrote:
On Wed, Mar 01, 2017 at 10:14:39AM GMT, Marcus MERIGHI wrote:
sc...@ggr.com (Scott Bonds), 2017.02.28 (Tue) 02:21 (CET):
> I'm polling using xrandr to check whether a new display was plugged
> in, so I can run a script to switch to it, i.e. plug in an external
> VGA monitor and it lights up automatically, unplug it and my laptop
> automatically switches back to using its internal display.
I have wanted the same and found no way to avoid polling xrandr(1).
If you find a way, would you be so kind to share the solution?
> But, every time I run xrandr my (USB connected) audio stutters, which
> makes me sad because I was hoping to poll for a new display every 5
> seconds, but that's not so great while listening to music.
Does the --nograb parameter of xrandr(1) help?
Marcus
> Does anyone know of a better way to notice a newly plugged in
> display...perhaps one that's more passive/efficient so as not to
> provoke stuttering audio? I don't see any output from hotplugd that I
> could use unfortunately, that seemed like the right place to look
> first. I didn't notice anything I could use in the Xorg log either.
>
> !DSPAM:58b4d0ab225251121513987!
Hi all,
A while ago, Keith Packard wrote small display configuration tool
called x-on-resize[0] which might be exactly what you are looking
for but I have no idea how much effort would it be to get it
working/ported on/to OpenBSD.
[0] https://keithp.com/blogs/x-on-resize/
It builds out-of-the-box
Thanks for making me know about x-on-resize,
David