A loooong time ago I worked in an open office space with the following rules:
- no headphones: you can talk to me
- headphone covers one ear: you can talk to me if it is important
- headphone covers both ears: only talk to me when the building is burning
It's not perfect by any means but it worked quite well.