blob: f8b1c4af6f33c72c478c5e9fb51b1b64473d3975 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/bin/sh
# values for melete -- possibly if we query pulseaudio/pipewire instead we
# would not need to encode values like these
snd_card_num=0
node_num=0x21
# to save battery power, only output the white noise if earphones connected
if grep -A4 "Node $node_num" "/proc/asound/card${snd_card_num}/codec#0" \
| grep 'Amp-Out vals: \[0x00 0x00\]' >/dev/null; then
cvlc --quiet --loop ~/annex/media/sounds/R*.ogg &
whitenoise=$!
fi
nmcli radio all off
zenity --info --title="whitenoise" --text="whitenoise"
nmcli radio all on
if [ "x$whitenoise" != "x" ]; then
kill $whitenoise
fi
|