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)
--- Makefile.orig Mon Oct 30 19:39:14 2023
+++ Makefile Mon Oct 30 19:40:03 2023
@@ -1,9 +1,5 @@
COMMENT = execute program on xrandr output changes
-
-GH_ACCOUNT = jceb
-GH_PROJECT = srandrd
-GH_TAGNAME = v0.6.3
-
+DIST_TUPLE = github jceb srandrd v0.6.3 .
CATEGORIES = x11
MAINTAINER = Stefan Hagen <sh+ports@codevoid.de>
No comments:
Post a Comment