illixion / vscode-vibrancy-continued

Enable Acrylic/Glass effect for your VS Code.
MIT License
556 stars 32 forks source link

[Feature]: A way to install with a seperate installer #117

Open tekigg opened 9 months ago

tekigg commented 9 months ago

Is there an existing issue for this?

Is your feature request related to a problem? Please describe.

I'm trying to install VScode animation alongside Vibrancy and I tried importing it using the built in import config of VScode. Unfortunately it doesn't seem to work, plus it's a little limited it seems.

Describe your idea or feature request

Is there a way to get the script path of VScode Vibrancy and import it with something like Apc Customize UI++ ?

Describe alternatives you've considered

No response

Anything else?

No response

illixion commented 9 months ago

Vibrancy makes changes to /vs/code/electron-sandbox/workbench/workbench.html, /main.js and on macOS, /vs/code/electron-main/main.js in VSCode's installation folder. You'll also need to copy the contents of runtime from this repo to /vscode-vibrancy-runtime-v6. You can likely perform a diff on those files before and after installing Vibrancy to get the full list of changes made.

You can see the code that makes these changes here: https://github.com/illixion/vscode-vibrancy-continued/blob/master/extension/index.js

Vibrancy works with any other well-written extensions that don't outright replace the contents of VSCode's internal files, but rather patch them by making only the necessary changes. If that's not the case, then there's no way to guarantee that Vibrancy will work and won't cause VSCode to break. This check is done by searching for an HTML CSP tag that should always be present in workbench.html (and that we need to modify), so you should ensure that it's not being completely overwritten by either of those extensions.

Finally, I've checked the repo of the APC project, and it appears that they have their own version of a transparency effect that you could try using: https://github.com/drcika/apc-extension/issues/13#issuecomment-1596221902

amnweb commented 9 months ago

No, it’s not the same. APC can make the window transparent but can’t add blur. So, because of all this I have combined vibrancy + apc and I got some interesting result on windows 11 :D

Anyway both extension can work together only when i set titlebar to native for some reason.

Screenshot 2023-12-21 021234

RoyalFoxy commented 9 months ago

@amnweb I don't think you read the discussion illixion regarding APC and vibrancy cause I could make it work easily and it is vibrancy, not just transparent.

RoyalFoxy commented 9 months ago

I just tried it on vscode insiders and it only makes the entire window background transparent as vibrancy doesn't work but that can't be your issue cause vibrancy-continued wouldn't work either...

tekigg commented 9 months ago

Vibrancy makes changes to /vs/code/electron-sandbox/workbench/workbench.html, /main.js and on macOS, /vs/code/electron-main/main.js in VSCode's installation folder. You'll also need to copy the contents of runtime from this repo to /vscode-vibrancy-runtime-v6. You can likely perform a diff on those files before and after installing Vibrancy to get the full list of changes made.

You can see the code that makes these changes here: https://github.com/illixion/vscode-vibrancy-continued/blob/master/extension/index.js

Vibrancy works with any other well-written extensions that don't outright replace the contents of VSCode's internal files, but rather patch them by making only the necessary changes. If that's not the case, then there's no way to guarantee that Vibrancy will work and won't cause VSCode to break. This check is done by searching for an HTML CSP tag that should always be present in workbench.html (and that we need to modify), so you should ensure that it's not being completely overwritten by either of those extensions.

Finally, I've checked the repo of the APC project, and it appears that they have their own version of a transparency effect that you could try using: drcika/apc-extension#13 (comment)

Thank you so much for taking in the time to look into this!

I've been trying to get vibrancy working on that end but it doesn't seem to be working on Windows, although that's an APC issue rather than vsc vibrancy. Or maybe I'm just not figuring out the correct configuration as I only found examples for OSX :c

tekigg commented 9 months ago

I just tried it on vscode insiders and it only makes the entire window background transparent as vibrancy doesn't work but that can't be your issue cause vibrancy-continued wouldn't work either...

That's my problem. I can't seem to be able to have both working at once without one of them breaking T-T I'm trying to have vscode-animations and no matter what I do either both break or one of them breaks depending on the install order-

amnweb commented 9 months ago

I just tried it on vscode insiders and it only makes the entire window background transparent as vibrancy doesn't work but that can't be your issue cause vibrancy-continued wouldn't work either...

Screenshot 2023-12-21 104055

tekigg commented 9 months ago

kinda-maybe-perhaps-off-topic but @amnweb can I have your configs? :0

MrOxMasTer commented 8 months ago

I have the same problem that I can't combine APC and vibrancy. When I turn on APC, the vibrancy effect simply disappears. I just wanted to connect animations too, and as it is now, the animation extension gives you a choice of what to use: APC or custom CSS and JS. And it's funny that vibrancy also works on custom CSS and JS. But the problem is that some animations work crookedly with custom CSS. Even the animation of closing explorer looks strange. And another problem is that in custom CSS, as in APC, you cannot write styles in setting.json. This is very convenient because you can always store the VS code configuration (profile) on GitHub or locally and you will have everything together. And custom CSS requires a separate file, which may be convenient for some, but not for some.

RoyalFoxy commented 8 months ago

@MrOxMasTer have you tried this

{
  "animations.Install-Method": "Apc Customize UI++",
  "apc.electron": {
    "backgroundColor": "#0000",
    "frame": false,
    "transparent": true,
    "vibrancy": "under-window",
    "visualEffectState": "active",
  },
  "apc.imports": [
    "file:///Users/royalfoxy/.vscode/extensions/brandonkirbyson.vscode-animations-2.0.1/dist/updateHandler.js"
  ],
}

Note that this only works on macos as vibrancy is their window blur. I couldn't find anything on their github page about Windows' Mica and Acrylic if you are on a windows machine.