I am writing my own status bar program for suckless dwm and the last thing left on the list is getting volume percentage from default pulseaudio sink. In bash, I have solved this with this pipe:
pactl list sinks | awk '$1=="Volume:" {print $5}'
Is there a good way to do it in C?