Wednesday, November 01, 2023

Re: [new] x11/srandrd 0.6.3 - the missing hotplug daemon for X outputs

Omar Polo wrote (2023-10-30 19:46 CET):
> On 2023/10/30 14:28:35 +0100, Stefan Hagen <sh+openbsd-ports@codevoid.de> wrote:
> > Stefan Hagen wrote (2023-10-30 13:56 CET):
> > > I was looking for a solution to invoke autorandr when a monitor
> > > gets attached/detached. Unfortunately this emits no event that our
> > > hotplugd(8) can catch.
> > >
> > > Today I stumbled over srandrd, and it's solving this issue in a nice and
> > > clean way.
> > >
> > > $ cat pkg/DESCR
> > > -----
> > > srandrd is a tool that executes a command on xrandr output change
> > > events, i.e. if a monitor is plugged or unplugged. By default srandrd
> > > forks to background and exits if the xserver exits.
> > > -----
> > >
> > > You can drop "srandrd some_script.sh" into .xsession and it will run this
> > > script when X output changes happen.
> > >
> > > Inside the script, you have variables available to filter and react to
> > > specific events. How that works is described in srandrd(1).
> > >
> > > Comment/OK for import?
> >
> > I noticed the CFLAGS weren't quite right. I adjusted the patch to
> > remove -Os and add the OpenBSD CFLAGS (-O2 -pipe).
> >
> > Update attached.
>
> Can't test it right now, but the port looks fine and seems useful.
> OK op@ to import
>
> nits:
>
> - please remove the stray empty lines at the bottom of DESCR
> - maybe I'd drop the "By default srandr forks to the background [...]"
> from the DESCR, doesn't seem the place to document such behaviour.
> Thankfully, this port ships a manual describing the tool.
> - to save a few lines, you could consider using the shiny new DIST_TUPLE
> (just a suggestion)

Thanks. I removed the nits and added DIST_TUPLE. I haven't used it
before, so thanks for suggesting.

I'll import after one more OK.

- Stefan

No comments:

Post a Comment