Jump to content
(^_^)

How to make the Alfred search window a frontmost app

Recommended Posts

Here are my parameters: 

 

5a2bc3e935124_2017-12-09at12_07.thumb.png.7760c1e9c1e396a57a38c42217638e11.png

 

I actually left them as default and they work well for me. Only thing I did change was lower key repeat to be really low: 

 

5a2bc413d1d25_2017-12-09at12_07.png.10c0a01f9aa927ab5b9d9ff8f0ff5384.png

 

 

Share this post


Link to post
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

Share this post


Link to post

@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).

 

Cheers,

Andrew

Share this post


Link to post

@Andrew Many thanks for the clarification! This all makes perfect sense - even to a scripting neophyte, like myself!

 

If Alfred can't take focus as a frontmost app, is there a different way to check (via AppleScript) whether his window is open?

 

Thanks again for all of your help!

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...