dotfiles/.bin/OLD/recio

23 lines
424 B
Plaintext
Raw Normal View History

2023-02-22 08:31:38 +01:00
#!/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)