Move the pulseaudio code to your own file.
Create a PulseaudioButton object that will be responsible of everything.
Mute volume with midle on volume button.