This is a simple macro that I find invaluable, so I thought I would share it.
I run it from the MD Drawer.
On first run, keep device awake is enabled until either the screen is off or the regular interval timeouts. I set the latter to 30 minutes, as this prevents the screen staying on until...