Controll your mac's screen brightness based on which app is in focus.
Set the desired brightness per app and continue with your work and let "menubar-auto-brightness" automatically adjust screen brightness when you switch apps.
Improve your productivity!