Open yoyobara opened 3 months ago
however, waiting a second before program exists fixes the problem (https://github.com/sigoden/aichat/issues/160)
I just figured out that the case is a little different in linux, since the process is responsible for providing the clipboard until something new is copied. so I managed to get it to work by spawning a thread that does just that.
but something doesn't add up; why waiting a second before exiting in the original problem worked??
Same thing happens even if you call something else after calling set_text
, wait 1s, then exit.
Currently trying to show a notification directly after calling set_text
, waiting 1s, then exiting, but I still encounter the same issue.
Note: I am calling the set_text
function inside of an async block while using tokio for async support.
Edit
Made an issue that shows an example of it not working #154
running the following:
nothing new seems to be copied to the clipboard. the previous thing in the clipboard is still there.
output of
cargo run
:my
neofetch
: