Let me explain the scenario:
I always keep my phone in vibration mode (no ringer, no notification sounds, just the vibration), since I'm a forgetful person and I'd end up forgetting to turn the ringer off when I'm in a meeting or other occasions when it wouldn't be appropriate.
This works fine for my needs, except in one instance: when listening to music. When I listen to music I typically keep my phone in the pocket of my jacket and I end up missing all my notifications, since between the music and the fact I don't have the phone in my hand or on my desk I can't hear nor feel the vibration.
My question is: is there a way to turn the ringer/notification sound on when the headphones are connected, while keeping it off when they aren't?
I'm running rooted stock Marshmallow (6.0.1)