2024-09-20 18:45:02 +02:00
|
|
|
#!/bin/sh
|
2024-01-25 14:39:08 +01:00
|
|
|
|
|
|
|
volume (){
|
|
|
|
vol=$(pamixer --get-volume-human)
|
|
|
|
mic_vol=$(pamixer --default-source --get-volume-human)
|
|
|
|
echo "{\"speaker\": \"${vol^}\", \"mic\": \"${mic_vol^}\"}"
|
|
|
|
}
|
|
|
|
|
|
|
|
volume
|
2024-09-22 11:05:58 +02:00
|
|
|
pw-mon --color=never | grep --line-buffered "changed" | while read -r line; do
|
2024-01-25 14:39:08 +01:00
|
|
|
volume
|
|
|
|
done
|