I just realized I need this for myself and quickly cooked up a solution using tridactyl, ddgr, and jq that fits perfectly in my workflow. Everything is reduced to just typing `:cp <SEARCH QUERY>` without moving to a new tab or losing flow.
The entire function is basically this (requires Tridactyl native messenger).
The entire function is basically this (requires Tridactyl native messenger).
[1] https://github.com/tridactyl/tridactyl[2] https://github.com/jarun/ddgr
[3] https://stedolan.github.io/jq/
PS: I used this tool itself to find the links for the three projects mentioned above.