13 lines
274 B
Text
13 lines
274 B
Text
|
#!/bin/bash
|
||
|
|
||
|
volume (){
|
||
|
vol=$(pamixer --get-volume-human)
|
||
|
mic_vol=$(pamixer --default-source --get-volume-human)
|
||
|
echo "{\"speaker\": \"${vol^}\", \"mic\": \"${mic_vol^}\"}"
|
||
|
}
|
||
|
|
||
|
volume
|
||
|
pactl subscribe | grep --line-buffered "'change'" | while read -r line; do
|
||
|
volume
|
||
|
done
|