How to disable pop-ups and notifications?

How to disable pop-ups and notifications?

I have Android 5.1. I use my phone as navigation when I`m driving and I need to disable all notifications and pop-ups. I know I can block notifications from settings, but this takes too much time to ...