Left-clicking the volume widget toggles mute on the default sink, so it works for speakers and headphones alike.