Chris Narkiewicz <he...@ezaquarii.com> writes:

Is it possible to match command arguments against an expression in
doas.conf?

I'd like to allow user to run wsconsctl display.brightness=<0-100> and the only solution i found so far is to explicitly put all values in
doas.conf.

Since no-one has yet offered any better suggestions: perhaps you could write a wrapper script that can be called without arguments, and instead takes the brightness value from stdin? E.g. something like:

$ echo 50 | doas /usr/local/bin/my-wrapper

where my-wrapper is something like:

   #!/bin/ksh

   IFS=
   read -u VAL
   wsconsctl display.brightness=${VAL}

(Obviously the script should check that VAL is an appropriate value.)


Alexis.

Reply via email to