Andrew

Cheeky little transparency blur hack for themes

60 posts in this topic

NOTE!! From Alfred 2.4, the blur setting is in Alfred's Appearance > Options. You won't need to use the defaults writes, but it's still marked as experimental. I plan on implementing the native Yosemite blur at some point and make this an official feature.

 

This is and always will be a hack, but I'm adding a defaults write preferences item to set the background blur of a window. This will allow you to have nice transparent themes but still readable over busy backgrounds.

 

There are a few important caveats with this:

  • It uses a private OS X API which means it may stop working at any point outside of my control
  • I may take this feature out if it causes general instability and will ignore any moans of "put it back"
  • It disables the 'Fade in Alfred Window' option because these don't play nice together
  • It slows things down lots on slower Macs
  • This will work in OS X 10.9 Mavericks from Alfred 2.3 onwards!

To use this hack, quit Alfred and his preferences then type this into Terminal:

 

OS X 10.9 Mavericks:

 

defaults write com.runningwithcrayons.Alfred-2 experimentalBlur -int 5

 

... the value can be anywhere from 1 to 15 for different blur radius levels, set to 0 to disable.

 

OS X 10.8 Mountain Lion and below:

 

defaults write com.runningwithcrayons.Alfred-2 experimentalBlur -float 3.0

 

... the value can be anywhere from 1.0 to 5.0 for different blur intensity levels, set to 0.0 to disable.

 

Here is what you should see:

 

frosty.png

 

Cheers,

Andrew

Share this post


Link to post
Share on other sites

Thanks, I enjoyed the caveat that the hack might be removed and all "moans" for re-instatment will be ignored. I guess at this point a lot of our nitpicking requests sound like moans, lol.

 

Seriously though, if there was a most dedicated developer of the year award it would go to you and Vero, not even a close runner-up. Thank you for your unwavering dedication to Alfred and it's users. We truly appreciate all the time you put in to development and support no matter how much we "moan" for this and that!

 

  • I may take this feature out if it causes general instability and will ignore any moans of "put it back"
Tyler Eich, CarlosNZ, Vero and 1 other like this

Share this post


Link to post
Share on other sites
Seriously though, if there was a most dedicated developer of the year award it would go to you and Vero, not even a close runner-up. Thank you for your unwavering dedication to Alfred and it's users. We truly appreciate all the time you put in to development and support no matter how much we "moan" for this and that!

I second that! Alfred's developers set the bar VERY high; I can't stand half-baked software from other developers since I started using Alfred  ;)

CarlosNZ likes this

Share this post


Link to post
Share on other sites
Why this has stay as a hack ? iTerm2 has a switch for the background blur. I'm just curious.

 

Because of the reasons I gave in the original post... mostly it's private api and could be taken away at any point. I care if suddenly Alfred crashes on trying to show the window because a private API has moved, iTerm2 may not care.

Share this post


Link to post
Share on other sites

Not sure if it's a "bug" but I have to quit Alfred and start him again if I want to disable the blur effect :) Enabling didn't require restart, though.

Share this post


Link to post
Share on other sites

Really cool, unfortunately cant get it to work, both with the terminal command nor with the workflow made available in this topic :-(

 

Did you restart Alfred? It only worked for me when I restarted Alfred

Share this post


Link to post
Share on other sites

Hmm, this fails for me as well... :/

 

OS X 10.8.3

Alfred v2 official release build

 

1. Quit Alfred

2.1. Launched Terminal

2.2. Executed: defaults write com.runningwithcrayons.Alfred-2 experimentalBlur -float 3.0

3. Launched Alfred

 

Still looks as before.

Share this post


Link to post
Share on other sites

Works fine for me. 

To those having trouble, make sure to have set the opacity <100% if you haven't done so. 

What do you mean by that?

Share this post


Link to post
Share on other sites

What do you mean by that?

 

In your theme pref, click to change the alfred background colour and there should be option to change opacity

Share this post


Link to post
Share on other sites

Can you attach a screen shot showing the opacity setting? I don't see it anywhere...

 

Edit: okay, I see... this requires some theme editing know-how. Must say the controls are very not user-friendly.

Trying to get the hang of it.

Edited by YtseJam

Share this post


Link to post
Share on other sites

Or single-tap it in my case.

Okay, got the hang of it.

 

The problem was indeed the need for opacity in my theme.

Now that I've experimented... I've come to this conclusion:

 

Andrew, could you please share the theme you showed in the opening post? :)

Share this post


Link to post
Share on other sites

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