Soft switch for Mac sound output
In Preferences->Sound, select "Show volume in menu bar". You should then see a little speaker icon in your menu bar.

If you option-click that (click while holding alt/⌥), you can select the audio output right there.

Update: Only works for audio devices connected via USB or DisplayPort/Thunderbolt, not for the Headphone port.