Garulf / pyFlowLauncher

Python JSON-RPC library for Flow Launcher plugins.
https://garulf.github.io/pyFlowLauncher/
MIT License
12 stars 1 forks source link

Perform multiple `JsonRPCAction`s within single query #10

Closed Marlstar closed 2 months ago

Marlstar commented 2 months ago

Hello! Is there a way to perform multiple actions for a single query? I am looking to copy to clipboard, change the query, and possibly more upon the selection of an option.

Thanks!

Garulf commented 2 months ago

Hi @Marlstar,

Sorry due to the way Flow Launcher communicates with JsonRPC plugins the plugin is exited after Flow Launcher detects output in stdout. This makes sending multiple actions impossible.

You may have luck using a library like clipboard instead of relying on JsonRPCAction to copy to the clipboard.

Marlstar commented 2 months ago

Helll @Garulf, I am currently working on a plugin to get passwords from Bitwarden in FlowLauncher. I am able to use pyperclip to copy to the clipboard, but I was also aiming to clear the query to hopefully free memory (removing the passwords from memory). I am concerned about this due to the fact that when flowlauncher is reopened, the query is still there, and options (with the passwords in their action) still persist.

Do you happen to know how to clear the options so that memory is hopefully freed? Thanks!

Garulf commented 2 months ago

As stated above, use a 3rd party library to copy to clipboard and send the JsonRPCAction to clear the results.