Minor refacotoring.
Added a function for the Hydra to know whether the app is in focus.