Add voice control

This commit is contained in:
KK
2026-06-18 15:13:57 +02:00
parent 89e9f63019
commit 8d1fb991fa
3 changed files with 46 additions and 10 deletions

View File

@@ -7,14 +7,21 @@ print_status() {
brightness=$(brightnessctl -m 2>/dev/null | awk -F, '{print $4}')
printf 'VOL %s | BRI %s | %s\n' "${volume:-n/a}" "${brightness:-n/a}" "$(date +'%Y-%m-%d %H:%M:%S')"
voxtype_state=$(voxtype status 2>/dev/null)
case "$voxtype_state" in
recording) voxtype=' | VOX REC' ;;
transcribing) voxtype=' | VOX ...' ;;
*) voxtype='' ;;
esac
printf 'VOL %s | BRI %s%s | %s\n' "${volume:-n/a}" "${brightness:-n/a}" "$voxtype" "$(date +'%Y-%m-%d %H:%M:%S')"
}
trap print_status USR1
print_status
while :; do
sleep 60 &
sleep 1 &
wait $!
print_status
done