I have used death.au’s work (Simple focus mode (CSS tweak)) to develop a way to do this with automation: