-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Windows, macOS and Linux transparency #52707
Conversation
Thanks. Since windows-swca and windows-blurbehind are modules that I wrote solely for this, reviewing those is also appreciated (I'd be willing to transfer ownership to Microsoft too) |
Are text over transparent background lost LCD antialiasing? |
I haven't seen such thing happen while testing |
I know there are some concepts in MS that adopted FDS to Code, but I cannot provide you the images :( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks beautiful ❤️
I like the GlassIt-VSC extension, but it cant achieve opaque text. I like having videos playing in the background while coding :-) Thanks |
Yup that should work. GlassIt-VSC changes the opacity of the whole window, but this only changes the background. You can use the "transparent" option of window.compositionAttribute for that. |
@be5invis SWCA has no track record of breaking antialiasing. However, NSVisualEffect may cause that effect with non-Cocoa apps, but Electron is not subject to this and works with text antialiasing. |
I tested this on macOS with the modified vsc-theme-railgun theme. It works, but the background transparency will revert to fully opaque after a couple window reloads. Besides that, great work on this! |
This is looking awesome! ❤️ Hope to see it in the stable releases soon |
here's my fix of merge conflicts. |
No Pain No Gain |
Can someone give me the full instructions on how to build / install this on windows 10? |
I put the instructions for macOS and Windows users here deeply above, but you can jump to the direct link: #52707 (comment) |
Why won't this be merged? |
Sorry for disturbing you guys. I made a smaller transparent patch for latest 1.39.2 version, The directory is a ready-to-build Arch Linux package(also synced to AUR: https://aur.archlinux.org/packages/code-transparent/ ). So if you are an Arch Linux user, you can directly build it with If you want to use the patch alone (without corresponding PKGBUILD for building Arch Linux package), be sure to check out the post_install message for troubleshooting after building. Tested on Arch Linux, i3wm/compton/amdgpu, and Swaywm/intel. It's a bit sad to see this PR was closed. And I appreciate much to guys making effort for this feature. :) |
@frantic1048 Thank you! |
Hello @frantic1048 I would like to install it into I use nvm. I installed electron, gulp and yarn installed via npm from nvm. How to apply it to PKGBUILD? |
If you want to do this, you may change the Or, are you just want it to co-exist with the
I'm not sure how cutting-edge the Insiders version is. There is an aur/code-git package, which builds from the current https://github.com/microsoft/vscode master branch. You could insert the patch( transparent.diff ) into If you mean the exact Insiders version, there is an
Hmmm, are you using Arch Linux? You do not have to install these packages via npm. There are electron gulp and yarn in the official repository. Besides, By the way, there is a prebuilt package for |
I got it, but a small error, before, check the versions:
All packages libsecret, libx11, libxkbfile and ripgrep are installed.
|
On my machine:
You may try to avoid npm globals during building(strip npm global bin path from $PATH), or use For short, install |
Installing with these commands inside the folder |
Installing(what) withe these(what) commands inside the folder According to your Avoid using manual installed(not installed by pacman, but nvm/npm install) To avoid using manually installed packages here's two way: (which I've mentioned in the previous post: #52707 (comment))
(longer version)
Further, there is a SOLUTION C: If you just want to use the package without modifying PKGBUILD, you may grab prebuilt |
Did anyone try this patch on MacOS? |
I may just be an idiot, but I can't figure out how to clone this repo. At the top of page, where there'd normally be a link to @sylveon 's fork, it just says unknown repo. I can see all changes in the |
I deleted my fork. You can get a patch file to apply to your clone of this repo by going to https://github.com/microsoft/vscode/pull/52707.diff |
@vegerot, since the Microsoft developer closed this pull request, the contributor deleted the branch and his repository. But you can get from @frantic1048. Just the blur is just not available in @frantic1048's repository. If you want one quick hack, just use devilspie which can make easily VSCode transparent and blurry, without affecting the text. |
Your diff patch is no longer working for the latest commit of VSCode.
I decided to install normally code-transparent via archlinuxcn, but I would like to change from And where is the blur? |
That's because I already said I'm not gonna maintain it |
To clarify, on trivial Linux desktops(and even on macOS and Windows), blur is almost identical stuff to transparency. It's your compositor's response to draw a transparent/blurred window. In short, a compositor is who composite all windows' graphics into a single image and displays on your screen. Each application is drawing content on its own window. For the long story, you may want to search keywords like I've pointed out checking user's compositor about transparency in
It's the same with blur: if your compositor supports blur and you have enabled it, you will get blurred VS Code window. Because it is your compositor's work to take you a transparent/blurred window. For example, I'm using i3wm and Compton(the compositor mentioned above) in the screenshot. Transparent and blurred windows are all done by Compton, thus as long as I enabled transparent/blur in Compton's setting, the transparent/blurred windows come to me. For KDE, you may want to check |
Interesting, @frantic1048 I use KDE, and soon I will try i3. I will install Compton. You forgot of answering my question:
|
I've no idea what to answer(where's the question ?). The source code of the package just lies here: https://aur.archlinux.org/cgit/aur.git/tree/?h=code-transparent, You can modify anything as you wish. |
I decided to uninstall from archlinuxcn and to build via chroot. I changed from
Please check the files: code-transparent.zip |
@gusbemacbe If you didn't update the integrity variable after changing the source, it is intended to fail. You may need a quick look at PKGBUILD introduction about integrity section:
And further, a fundamental understanding of PKGBUILD structure is recommended if you are going to DIY. There are lots of wiki pages and documentation about PKGBUILD/ |
It has worked now. The app is renamed appropriately VSCode Transparent (short) and Visual Studio Code Transparent. In spite of I being an user of KDE, I installed Compton, created a folder and a file - But the blur worked with devilspie: |
@gusbemacbe You don't need compton to blur it, the default kwin compositor can do it just fine. |
It does not work. Here is: |
It seems the window class name is not correct. On X11 you can find window class name by |
@Otakumouse is there any chance you could share the compiled version as yarn watch run gives out Task never defined: run error ? |
This pull request adds support for window transparency on all 3 platforms. (Arch) Linux and Windows 10 has been personally tested, but I couldn't test macOS or Windows 7 (but they should work in theory).
Here's a few screenshots:
(made with a custom version of the @be5invis's railgun theme: https://github.com/sylveon/vsc-theme-railgun)
(spent too much time thinking about "can I?" and not enough thinking about "should I?")