For sure! I briefly looked into integrating more with browsers, for example, to better what's currently opened in different windows. But so far the only way I found was to rely heavily on macOS accessibility API to get some bi-directional data flow between the browser and the external app.

Or alternatively try to do this kind of integration via a browser extension. I know Raycast is doing something similar with their browser extension, when the extension acts as a proxy between the app and the browser to deliver different context to the app

You should look at the native messaging API, it does what you need for bi-ditectional communication between extension and local app.

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Web...

I am planning to use the extension route to... bypass the imgur UK block. Just need to use imgur for more than once in a while.