Wrote some similar scripts for my Linux setup, that I bind with XFCE keyboard shortcuts:
https://github.com/samoylenkodmitry/Linux-AI-Assistant-scrip...
F1 - ask ChatGPT API about current clipboard content F5 - same, but opens editor before asking num+ - starts/stops recording microphone, then passes to Whisper (locally installed), copies to clipboard
I find myself rarely using them however.