I'd like to never show ANY notifications if I'm currently screen sharing to prevent those awkward moments where I forget to disable them manually and run the risk of someone IM'ing me something inappropriate. Notifications should be automatically disabled when I start screen sharing and automatically re-enabled when I stop.
Is this possible at all? Even if it requires some development?
You didn't mention the OS you're using so for this answer I'm using 10.12.5.
You can option+click on the 3 lines for Notification Center in the menu bar:
This will silence any notifications that use the Apple system for notifications. To put notifications back to normal, option+click again.
This doesn't silence any notifications that don't use Apple's system. To silence those, you'll need to turn them off at the application-level.