Terminal: Add setting to control Acrylic "Blur" in addition to opacity

Created on 1 Jul 2019  ·  38Comments  ·  Source: microsoft/terminal

Pretty much the title.

Right now we're only using the default blur amount.

Area-Settings Area-TerminalControl Help Wanted Issue-Task Product-Terminal

Most helpful comment

For clarification, would this allow transparency of the window without the blurring (i.e. act like cmd and PS)? It would be great to be able to read text behind the window.

All 38 comments

Opacity slider, with a toggle for turning Acrylic on or off, would also work

Yanking the triage tag. This is a known amount of work that we just need to _do_.

This might be impossible...

When I filed this issue I mistakenly thought there was a "Blur" property on the AcrylicBrush, but that doesn't look like it's exposed at all. See its page on MSDN.

And looking at this issue, it looks like this might just be impossible, for security reasons.

In this vein, I would like two independent properties to set acrylic values for when the window is in the foreground and when it is in the background. For example, I would like the window to be at 90% opacity when the window has focus, and 70% opacity when it does not.

For clarification, would this allow transparency of the window without the blurring (i.e. act like cmd and PS)? It would be great to be able to read text behind the window.

When I filed this issue I mistakenly thought there was a "Blur" property on the AcrylicBrush, but that doesn't look like it's exposed at all. See its page on MSDN.

Isn’t that controlled by TintOpacity? https://docs.microsoft.com/en-us/windows/uwp/design/style/acrylic#custom-acrylic-brush

I guess this is what most people (or, at least, me) mean when talking about changing the blur level.

I have found (at least one) way to accomplish this effect, but not via UWP. The really old, Vista-era API DwmEnableBlurBehindWindow, if called on Windows 10, changes the window background to a semi-transparent black, without a blur. How ironic given the function’s name, huh? AFAICT, this doesn’t present any security issues, as the app cannot read the contents of the background shown, as it is processed entirely within dwm.exe.

That being said, wouldn’t we be able to use SetLayeredWindowAttributes on the root HWND, just as conhostV2 does? As I understand the docs, this should also affect the child windows. If it does so in a way that would be unsatisfactory, we can then use that same function to set the alpha of the child HWNDs to 255 (opaque), then clear the child windows with a transparent color to erase the default background fill. After that we should be able to draw whatever we want on top of the transparent background window. This may take a bit of refactoring of the Cascadia architecture, but I see no reason why it wouldn’t be able to be done. Hope this helps!

To add my 2 cents, I would really like the sort of transparency and blur options iterm2 has on Mac. You have regular transparency, and you can add just a bit of blur to reduce eye strain but still make out the background wallpaper or whatever clearly.

The acrylic just looks terrible, and the thing under the window is completely unrecognizable.

@zadjii-msft @DHowett-MSFT We're not limited by the published API as MSFT devs. If you reach out to the library maintainers you can probably get this sorted out, them building their thing in a stupid way doesn't mean we all just have to live with it right?

For the record, this is the final must-have feature for me and window transparency isn't really usable without it imo. At least background image transparency works though, but it's much nicer to be able to see actual apps underneath and / or your real desktop. Terminus, Alacritty and Conemu all manage this (albeit with varying degrees of success).

@zadjii-msft @DHowett-MSFT We're not limited by the published API as MSFT devs. If you reach out to the library maintainers you can probably get this sorted out, them building their thing in a stupid way doesn't mean we all just have to live with it right?

👆🏻 this. so much this.

I'll note that https://github.com/goreliu/wsl-terminal handles transparency just fine (and I believe the way the majority of the people here want), so investigating that codebase is probably a reasonable place to start.

* EDIT *

And the transparency option really comes from the underlying https://github.com/mintty/mintty project

I want to read what's behind the window, usually code samples on a web page. In that vein, would it be better to have a hotkey that toggles between blur and non-blur transparency? Aka, turns acrylic off but maintains transparency. It could be push-and-hold or toggle, would be fun to try both.

This comment (https://github.com/microsoft/terminal/issues/1375#issuecomment-569483109) from @JasonStein might be relevant to this thread:

Hey guys, I am the author of Notepads, this is how I make background acrylic effect "always on" for both title bar and window body of Notepads App: JasonStein/Notepads:src/Notepads/Services/ThemeSettingsService.cs@12940ad#L253

I created the Acrylic brush myself using "AcrylicBackgroundSource.HostBackdrop" with help of UICompositionAnimations library to make my life easier (ref: Sergio0694/UICompositionAnimations).

It is basically creating the brush from scratch using composition APIs (AcrylicBackgroundSource.HostBackdrop + Noise texture).

AcrylicBrush API is not the only choice. I'd really like to have an option for simply non-blur opacity, apart from acrylic options. It's strange to drop useful feature of cmd when making this Windows Terminal as cmd-ng.

Transparency with no blur at all if that can be done without acrylic even would be great so I don't have to alt-tab mid command to double-check something.

On mac and Linux I use transparent terminal all the time because I am often reading a document or some source code in the window underneath as I type its extremely handy.

Controlling blur would be ideal tho. (on the mac I use 3% blur just to make terminal text stand out without making text behind it hard to read.)

For clarification, would this allow transparency of the window without the blurring (i.e. act like cmd and PS)? It would be great to be able to read text behind the window.

Exactly! In fact, I won't even consider switching to Windows Terminal (as much as I love it) until this is implemented. I keep checking back, but disappointed to see that it still hasn't been done.

This feature is especially useful for those with a single monitor or limited screen real estate. I almost always have some web page or other text behind my terminal that I want to be able to read while in terminal. I adjust my transparency / opacity appropriately to make this a comfortable experience so I can still read my terminal well.

Please implement this ASAP. I'm looking forward to using WT and have been following it since the first Alpha release.

As a bonus, there should also be a boolean to toggle whether the transparency / opacity should also apply to the text in the Terminal. This would ensure that the text in the terminal remains vibrant and visible to make it more distinguishable from any other text in windows behind the terminal.

If the blur is to be referred to as Acrylic, I don't think it should deviate from the visual construction of other Acrylic surfaces beyond the opacity (which is variable with Acrylic Brushes)

If you start pulling apart the various layers like the Noise, Luminosity, or Blur amounts - it is no longer "Acrylic" but a composition layer set of effects.

I keep checking back

good news! You'll get an e-mail when we close this bug :smile: for better or for worse

I have to echo what everyone else is saying; I currently use the PowerShell Core msi install as my primary shell. As a very large component of my job, I am in this console half- or full-screen on an ultra-wide all day and need to be able to see things clearly underneath.

I love the idea and appreciate the effort Microsoft is putting into some of the admin utilities on Windows but, at this point, this new Terminal is simply a novelty that can't meaningful replace the original console. Please see the screenshot below; both windows are laid over the same spot on this page. One is great and the other is unusable, I don't have to point out which is which.

image

this new Terminal is simply a novelty

I appreciate your kind criticism of the project we've been working on for the past year and a half, but could you possibly _not_?

I empathize with how you feel; it isn't a fun spot, but also place yourself into the perspective of the user base (of largely paying customers) that has been waiting for this for a year and a half. I wanted to echo the other thoughts that seem to be pervading the community regarding this product and I wanted to at least provide a screenshot to be constructive since no one else had done so to this point. Without actually seeing what the issue is, it would be easy to dismiss the issue as minor or whining, but I hope you recognize that the top console in my screenshot is clearly non-functional. I hope it can be fixed.

  1. Don't worry, everyone on the team is a daily user of the Terminal. We're all the user base just as much as our external customers are.
  2. For the record, the Terminal was only announced last April, so y'all have only been waiting for 13 months 😉
  3. We've been investigating this issue for a while now. We understand that this isn't a trivial graphical issue, but unfortunately, it's not a technically trivial issue to fix 😕

@zadjii-msft I understand the third part which is why I posted the screenshot to kind of illustrate what everyone is complaining about in this and other issue threads. I appreciate you guys working to build cool products with a more OS agnostic approach, I hope it keeps moving along without too much headache for you.

"Our mission is to empower every person and every organization on the planet to achieve more." -Microsoft

Unfortunately, this new Terminal kinda toes the line. It definitely comes with some amazing features, like tabs! AMAZING!!! However, as developers we have to take the good with the bad, and sometimes we don't realize that there are features missing that end up being very important to the user until after launch. 🤦🏼‍♂️ This is free software, so I'm incredibly grateful for that and the fantastic commitment to Open Source from Microsoft in recent years (especially since Satya turned the company around). At the same time, the transparency of any terminal is a must in my book. The Acrylic effects are pretty to be sure, but not everyone is going to be OK with the blur, myself included, especially with limited screen real estate. 🥰

Keep up the great work Windows Terminal team!

I really will love if the Microsoft team add this feature, the question is, how can we ask for this feature to be included in the next release? I'm pretty sure that this can be achieved, thanks for all the work that you have achieved with this terminal so far. Yeah it´s not a technical problem, is a new requirement for the terminal.

I'd _love_ to have this in the next release, but as I've outlined at length in https://github.com/microsoft/terminal/issues/603#issuecomment-626830075, this _is_ a technical problem that doesn't have an easy solution, so I can't really commit on adding it in any particular release.

impressed so far with the efforts and looking forward to this configurable blur (or even just plain semi-transparency without the acrylic!) eventually being added in.. but until then will be sticking with wsltty.

Transparency is a must for a terminal window, since most power users need to see through the window often. Blur is mostly cosmetic while transparency is a actual tool.

@harounhajem that's not the same thing being discussed in this thread - the task in this thread is about controlling how much the Terminal blurs the background with acrylic enabled. I assumed that "Blur" was a property on the AcrylicBrush, when it's really not.

Honestly, this is probably a dupe of #603 at this point, but I'm leaving it open because there's at least 22 other people who are already following this thread for a resolution.

Lol @zadjii-msft he totally missed the point. And appears he removed his comment. 😅
But yes many of us are waiting for the day we can use this terminal app. 👀

Not sure if this should be a separate issue or not. I'd also really like an option to maintain opacity when Terminal is not the active window, or better yet, the option to use an alternate opacity value when inactive.

For now, I have a shortcut to set the active window to ~80% opacity, which works really nice with Acrylic blur as I can see what's behind but the blur effect helps the terminal text remain quite readable.

WT's acrylic is set to 0.8, while the AutoHotKey function sets opacity to 200 (200/255).

For now, I have a shortcut to set the active window to ~80% opacity, which works really nice with Acrylic blur as I can see what's behind but the blur effect helps the terminal text remain quite readable.

WT's acrylic is set to 0.8, while the AutoHotKey function sets opacity to 200 (200/255).

I’d be curious to read more about your setup for that if you’d be willing to share. It sounds like something I’d find useful.

AutoHotKey function:

#^Esc::
  WinGet, TransLevel, Transparent, A
  If (TransLevel = OFF) {
    WinSet, Transparent, 180, A
  } Else {
    WinSet, Transparent, OFF, A
  }
return

This toggles the active window between full opacity and 180/255 opacity. Shortcut is Win+Ctrl+Esc.
For Windows Terminal just set "acrylicOpacity" to something between 0.7 and 0.9, depending on your background color (darker = more noticeably transparent). I use:

"background" : "#560152",
"acrylicOpacity" : 0.75,

@narfanar Thank you so much for this! I have a transparent terminal on Windows now!

This didn't work for me as is, for some reason my version of windows does not understand the OFF setting, so I modified it slightly:

; Toggle window transparency.
#^Esc::
WinGet, TransLevel, Transparent, A
If (TransLevel = 255) {
    WinSet, Transparent, 205, A
} Else {
    WinSet, Transparent, 255, A
}
return

AutoHotKey function:

OMG Thank you so much! Never even occurred to me that AHK could do this. Tweaking the acrylic setting to get the desired blur amount seems to work. Still bit more distracting than the blur you get on mac terminal but it does the job.

Can use this terminal as my main now ty @narfanar

Was this page helpful?
0 / 5 - 0 ratings