dotfiles/.bin/OLD/recio
2024-02-14 07:55:58 +01:00

23 lines
424 B
Bash
Executable File

#!/bin/sh
# store previous and new values
PA=$(sysctl -n kern.audio.record)
PV=$(sysctl -n kern.video.record)
NA=$1
NV=$2
case $1 in
[01]) doas sysctl -q kern.audio.record=$1;
;;
r) doas rcctl restart sndiod;
;;
esac
case $2 in
[01]) doas sysctl -q kern.video.record=$2; ;;
esac
printf 'REC:%s CAM:%s\n' \
$(sysctl -n kern.audio.record) \
$(sysctl -n kern.video.record)