Any way I can script a local file to open in code-server as a Chrome app #6580
-
I have code-server running as a PWA via Chrome on my Windows workstation so it effectively looks the same as if I was running VS Code locally. I love that I can drag/drop files from my local workstation onto the open code-server window and it will open the file, however I miss the ability of right-clicking a file and choosing "Open with VS Code" or even setting it as default so I'm on a journey to see if it's possible. My first thought was to try and use Autohotkey or similar to simulate a drag/drop of a file onto the open window, I've tried a number of examples online but haven't had much luck. If I can simply have a script that accepts a file path as a parameter and simulates a drop onto the middle of the code-server PWA window I can easily set this up in my right-click options. Am I thinking about this the wrong way? What I'm trying to do might simply not be possible, but if anybody has any ideas that would be amazing. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I am not sure about automating drag/drop, but supposedly it is possible to properly register a PWA as a file handler: https://developer.chrome.com/docs/capabilities/web-apis/file-handling Then the next step is to get VS Code to actually handle the file. Oh, and turns out there is actually already an upstream issue for this. microsoft/vscode#135784 Give it a thumbs up, maybe they will prioritize it. Would be a really cool feature. |
Beta Was this translation helpful? Give feedback.
I am not sure about automating drag/drop, but supposedly it is possible to properly register a PWA as a file handler: https://developer.chrome.com/docs/capabilities/web-apis/file-handling
Then the next step is to get VS Code to actually handle the file.
Oh, and turns out there is actually already an upstream issue for this. microsoft/vscode#135784 Give it a thumbs up, maybe they will prioritize it. Would be a really cool feature.