Depending on the distro or DE/WM you are running and which programs you are using to manage your audio you maybe run into the hassle of having to switch audio outputs each time you connect a bluetooth device (headset/speaker). You can in fact make pulseaudio to autoswitch when connection is established and not do it manually.
To accomplish this you just need to check a condition in the default.pa
config file located in /etc/pulse/
directory on your install and add the following line load-module module-switch-on-connect
like in the code snippet below:
...
### Automatically load driver modules for Bluetooth hardware
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.endif
.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
load-module module-switch-on-connect # <<<<<< add this to let audio sink to autoswitch to the newly conencted BT device
.endif
...
after that just restart pulseaudio daemon with pulseaudio -k
to let changes take effect an try it out turning bluetooth on and just turning on your headset and letting it connect automatically.
Need to run this on startup
pactl load-module module-switch-on-connect