Jump to content

How to make the Alfred search window a frontmost app


Recommended Posts

  • 1 year later...
  • 1 year later...
On 9/7/2017 at 2:38 AM, Vero said:

Launch Alfred's prefs to Appearance > Options (in the bottom left) and choose Focusing: Compatibility mode which makes Alfred behave like an app taking focus.


Hi @Vero - Does this still work in Alfred 4 & Mojave?


If I've enabled Compatibility Mode for Focusing in Alfred's Appearance options, and I run the script below - while Alfred's search or file action window is open - shouldn't "Alfred" or "Alfred 4" show up as the frontmost app (i.e., as frontAppName in script below)? Or does the Focusing option control something else? Thanks for your help!

tell application "System Events"
	set frontApp to first application process whose frontmost is true
	set frontAppName to name of frontApp
end tell


Edited by Jasondm007
Link to comment

@Jasondm007 I'm not sure you'll ever see Alfred as a frontmost app, as he is configured as an LSUIElement. That focus mode changes Alfred's underlying window style mask, making the window non-activating.


You can see the effect of this option as soon as you change the option without even closing Alfred Preferences, or the Appearance > Options sheet. Show and hide Alfred, and when in Standard Mode, showing Alfred doesn't make Alfred Preferences lose focus. Switch to compatibility, and showing Alfred makes the Alfred Preferences window lose focus (fade out).




Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...