i really like my setup for switching back and forth to headphones and in NO WAY take any credit for the solution but just thought i would post how i am handling it.
there are several ways to do this but i wanted to be able to easily switch back and forth and i also did not want anything added to my Dock or Menu Bar.
you will need this:
1. CHUD and switch which you can find
here.
2. Quicksilver which you can get
here.
then:
1. unzip #1 from above and then install CHUD
2. place the switch.sh file from #1 above in your user name's Library folder
3. open terminal in your applications folder (under Utilities) and in terminal type the following:
cd Library
chmod 755 switch.sh
then exit terminal
4. open "Script Editor" in the "AppleScript" folder in your Applications
5. in script editor type:
do shell script "path/to/switch.sh" user name "your user name" password "your password" with administrator privileges
HOWEVER when you type this you are going to be replacing "path/to/switch.sh" with your path to the switch.sh file. so the easiest way to know what it is would be to go to the switch file on your Wind which you placed in your user name's Library folder and then left click it and hit "Get Info" and look where it says "Where" in the info at that is your path.
for example mine looks like this:

so my script would look like this:
do shell script "/Users/OSX86/Library/switch.sh" user name "OSX86" password "**********" with administrator privileges
and then also replace "your user name" and "your password" with your information as i did above.
6. hit compile in the script editor and then go to your menu bar and while in script editor hit "File" and then "Save as" and name it something like HeadPhones and save it to your desktop.
7. take the script you just placed in your desktop and move it to your "Scripts" folder which is located in Your Hard Drive(s) name (NOT User Name) under "Devices" in Finder then inside "Library" then "Scripts"
8. install Quicksilver and run it through the setup making sure you at least install the "plug-in" for "Terminal" for now and also create a shortcut key to bring it up when you need it. you can pick whatever you want but on the Wind i choose ALT + q so that after i am finished with this setup you can always bring up Quicksilver by what you choose the shortcut to be here.
9. when quicksilver starts you can "type to search" in that box for "headphones" script that we created but as you will see it will find it as you type. if it does not find it then you can alternatively just drag the script file into the search box. however lets not hit execute yet
10. go to settings (little wheel in upper right hand corner of search box) and choose "Custom Triggers"
11. in the bootm of the Custom Triggers box you will see a + sign and hit that and choose "Hot key"
12. choose "headphones" in the "Select an item" box and the "Action" box should be Run and "Command" Headphones (Run) and click save
13. now that you have a Custom Trigger for HeadPhones go to the end of that line and set a Trigger Hot Key setup by left clicking under trigger and for reference i choose "ALT then H" so that now you will just hold ALT and then hit "H" to toggle from your headphones to your laptop speakers.
14. almost there now. lets go back to preferences in Quicksilver and:
- check "Start at login"
- uncheck Warn before, Enable advanced, Show icon in dock, and Show icon in menu bar. if you already have it in your dock then you will need to right click on it and "Remove From Dock" and then it will not come back again.
- i choose to check "Check for updates" as well as auto and background install
15. Enjoy hitting ALT+H or whatever you choose to go back and forth to your headphones without any icons or dock items.
Remember you can always go back to work with Quicksilver by either hitting the short cut keys you selected in the beginning of the Quicksilver setup or by choosing it in your applications folder.
good luck