pointfichiers/bar/eww/scripts/get-volume
GaspardCulis 15edbe62cb fix(eww): get-volume script now uses pipewire monitor
Instead of the pulseaudio one
2024-09-22 11:05:58 +02:00

12 lines
276 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
pw-mon --color=never | grep --line-buffered "changed" | while read -r line; do
volume
done