Block all sounds going out through speaker when headphone connected
Currently you can't disable notifications via speakers while still having them via headphones. There's an open issue for that.

You also can use Llama or Tasker to switch profiles when you plug your headphones.