-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add setting to control Acrylic "Blur" in addition to opacity #1753
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. |
Isn’t that controlled by 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 That being said, wouldn’t we be able to use |
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). |
👆🏻 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 (#1375 (comment)) from @Jasonstein might be relevant to this thread:
|
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.) |
@zadjii-msft Can't follow. It depends very much on the transparency level which @cblake777's solution allows to be set granularly. In your examples in the other issue your transparency is way too low, so ofc it looks bad, no surprise. Also that you call it "vintage-style" doesn't make sense to me—this is exactly how users want transparency, no on and off on focus, no mandatory blur, no random opaque backgrounds/tabs/headers, no resource hog, no blurry fonts. If "vintage" is internal MS lingo then it's wrong, detached from your user base and should be changed. Also multiple panes work like charm, see below. I am a bit surprised that you downtalk such a brilliant solution, did you try exactly this solution with AHK and @cblake777's script? If not pls do, this solution is amazing, feels more polished than any macOS or Linux terminal and doesn't have any flaw, not a single one. I even use it now for Spotify and some dark browser windows such as Github in dark mode, I am so happy because other than this strange Acrylic mess the new Windows Terminal is awesome, a perfect package and probably the best terminal experience across OSes. |
@DHowett in your examples the transparency level is much too low, ofc it looks bad, did you read my prior comment? I am just repeating myself. Did you try the granular script from @cblake777 Btw, no need to get confrontative. I am a big fan of your work. |
I did -- that's actually from cblake777's script! 😄 |
then try to set the |
I don't disagree @DHowett that there certainly could be better solutions, but I also agree with @desmap that it looks like you need to adjust the transparency level to compensate. That's why my AHK script has the additional key combos for CTRL+Win+- and CTRL+Win++ so that I can adjust the transparency level of each window on the fly as needed. It's not a perfect solution, but for me it is a good solution, and it works really well right now. EDIT: I should also say that I don't use the command pallet as I'm more of a hotkey driven user, so I fully admit that I may not run into the same problems you do. |
how to use this script ??? |
@adicadi: Copy the text to your clipboard, open a text editor, paste the text, save it as a If you want to make it run automatically when you login, create a shortcut to your |
Note that the part I pasted was not the entire script, only a portion. The entire script is found as an attachment to a later post (#1753 (comment)). |
Everytime I open terminal I need to do Win+ctrl+ESC. Is there a way to run this automaticly? |
You might have to go look at AHK docs or forums it can pretty much do anything. Would probably only be one line in your script to run the set transparency function when the terminal gains focus. |
So the MS bot closed this issue with no reason because it's a mindless bot, yet the issue is still ongoing as of date. I wanted to set the terminal transparent and I get a horrible blur along with the acrylic that I want to remove, I don't want the blur, I just want the window transparency while keeping the titlebar/borders opaque and no weird AHK hacks or 3rd-party terminals. I disagree this issue should be closed, such a feature like this has been available in linux terminals ever since compwiz or other compositors were available almost two decades ago. Is there any progress regarding this feature, officially from MS? |
Its available in the latest preview build now. But yes a comment here to say that would have been nice. I guess this is that comment now :). |
@darkguy2008 If you'd read the thread, you'd find my post where I closed this issue, where I link it to #603 as a duplicate. That thread was closed by a PR, which you'll note was released in 1.12, which you can also find out about in the release notes, or reading the release blog post. Would you like something more official than that? |
Oh I didn't know that, I agree that a comment would've been nice. Thanks for the input!
Well, in the post where you closed the issue I didn't see anything about "it's been released". It's just that "we're going to track this to a single issue because too many yadda yadda duplicate yadda yadda". I wasn't even aware the PR meant that the feature was released. The blog post doesn't say anything about the I've been stuck in LTSC land for a long time, and just gave a try at Windows 11 today... Considering the time it's been in development since then I had expected this feature to be available already... And although I'm very happy to know it finally made to the preview release (and hopefully to the public releases soon)... I'm afraid to say that, no, it wasn't that obvious as you think it was. I came here from a google search looking for "how to remove acrylic blur from windows terminal" so 🤷🏻♂️ my bad! Edit: I just gave a try at the preview build and it's light years from the stock version provided in Windows 11 as-is. IMO this should be the default already, it even has an UI for the settings so I didn't even have to touch the JSON file to achieve the transparency effect I wanted. Amazing, thank you! |
@darkguy2008 I can't go win11 just yet no time to risk my dev env breaking atm. Can you tell me, does it actually let you control the Acrylic Blur amount or is it only controlling transparency. I suspect from the linked PR only turning blur off entirely was addressed. IF that's the case then this issue isn't technically resolved. |
Yeah sure, the new Preview version allows you to control both things. I'm very happy now: The only issue I see is that once you change the slider, the "Enable acrylic" toggle turns on, but you can just toggle it off once you're happy with the opacity :) I moved my entire dev env to Win11 and can't be happier. It only bugged on me once with the task manager and explorer icons flashing, but it was fixed after a reboot, so I recommend switching. The OS feels faster/snappier, too. |
This is not working for me. The transparency works in the powershell commandline, but once I open vim, where I do not change the background color, it changes to solid black. While the autohotkey script works fine. |
I did some more testing with vim and Neovim with this, and it works fine in Neovim but not in regular vim. I have this in my if !has('gui_running') && match($TERM, "screen") == -1
set termguicolors
au ColorScheme * hi Normal ctermbg=0
endif This enables 24 bit color and sets the background to black. In Neovim the background is transparent, while in regular vim the background is solid black except for the region right under the statusbar. My screenshot program is broken right now for some reason. |
For anyone not getting what |
@Komodroid nice screenshots, I would say that the acrylic is a bit too blurry, try iterm2 on a mac with a small amount of blur, it lets you focus on the foreground but still have the background be distinct and visible. |
This issue shouldn't have been closed as controlling the blur amount is much more ideal than simply having transparency. Also, that's the point of this question. While I appreciate that WT can now be transparent with clear text, we are still working around the fact that acrylic blur is way too much and we need to turn the blur amount down. The best so far is on macOS terminal. Having say 3% blur is perfect for keeping the terminal crisp and distinct from the still readable text behind it. |
If someone looking autoscript v2 script for transparency switching, script which works for me well: #Requires AutoHotkey v2.0
TLevel := 180
TMode := "full"
WS_EX_LAYERED := 0x80000
LWA_ALPHA := 0x2
#^Esc::ToggleTransparency() ; Ctrl + Win + Esc
#^=::IncreaseTransparency() ; Ctrl + Win + =
#^-::DecreaseTransparency() ; Ctrl + Win + -
ToggleTransparency() {
global TMode
hwnd := WinExist("A")
EnsureLayered(hwnd)
if (TMode = "full") {
TMode := 'manual'
SetTransparency(hwnd, TLevel)
} else {
TMode := 'full'
SetTransparency(hwnd, 255)
}
}
IncreaseTransparency() {
global TLevel
TLevel += 10
if (TLevel > 255)
TLevel := 255
SetTransparency(WinExist("A"), TLevel)
}
DecreaseTransparency() {
global TLevel
TLevel -= 10
if (TLevel < 0)
TLevel := 0
SetTransparency(WinExist("A"), TLevel)
}
SetTransparency(hwnd, Level) {
global TLevel
EnsureLayered(hwnd)
if (hwnd != 0) {
DllCall("SetLayeredWindowAttributes", "ptr", hwnd, "uint", 0, "uchar", Level, "uint", LWA_ALPHA)
}
}
EnsureLayered(hwnd) {
exStyle := DllCall("GetWindowLongPtr", "ptr", hwnd, "int", -20, "UPtr")
if ((exStyle & WS_EX_LAYERED) != WS_EX_LAYERED) {
DllCall("SetWindowLongPtr", "ptr", hwnd, "int", -20, "UPtr", exStyle | WS_EX_LAYERED)
}
} |
That seems.... kinda like overkill, for something there are already actions for in the Terminal itself: |
Agree. But set background opacity using terminal actions will not make a background transparent in combination with enabled acrylic material. With autoscript you will achieve window fogging effect. Plus it works with all windows. |
Pretty much the title.
Right now we're only using the default blur amount.
The text was updated successfully, but these errors were encountered: