pointfichiers/bar/eww/scripts/get-volume
2024-09-20 18:45:02 +02:00

12 lines
272 B
Bash
Executable file

#!/bin/sh
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