Closed polygonnedpotato closed 1 month ago
Unfortunately there isn't a way to add this feature; the backgrounds are running in a separate process than the extension thread, so there isn't a way to actually get the current background via the extension.
If you want to copy or share settings you can open your user settings from the command pallette, the options for this extension will start with background.
well, the picture url is exposed by style
tags in the head section, so
/url\(".*"\)/gm.exec(document.head.getElementsByTagName('style')['KatsuteDev/Background-window-images'].outerText)[0].slice(5,-2)
returns a vscode-file encoded url, for example vscode-file://vscode-app/home/kitsune/Pictures/wall.jpg
refers to /home/kitsune/Pictures/wall.jpg
i don't know how going about copying the image to the clipboard, but that's how to get the file url.
VSCode extensions do not have access to the DOM, it is not possible to have a command in the extension run code on the HTML in the IDE.
ah, i see
i think i will investigate into how vscode works and see if there might be a way around that
There is not a way, the separation is intentional so extensions can't mess with the front end elements.
This issue has been marked as stale due to inactivity.
This issue has been closed due to inactivity.
Feature
In the command picker, there should be an option to copy the current background for either the window, editor, panel, or sidebar.
Like
Background: Copy Image
>Window
Optionally, potentially providing a hint as to what the file name is would be a nice touch.
Reason