eepp / jome

An emoji picker desktop application
MIT License
39 stars 3 forks source link

copy to clipboard? #4

Closed 0xDaksh closed 4 years ago

eepp commented 4 years ago

Thank you for this detailed description.

I believe I can decode those three words as your wish to copy an accepted emoji to the clipboard using jome.

jome's sole purpose is to help you browse emojis, find one, and accept it. jome doesn't care what you do with the accepted emoji; what happens after is up to you: jome can execute a command to which it passes the emoji or its codepoints, or print the emoji/codepoints to the standard output.

Here's a command-line example which copies the accepted emoji to the clipboard using xsel on Linux:

$ jome -n | xsel -b

You'll need a bit more logic to support cancellation, for example:

emoji=$(jome -n)

if (($? == 0)); then
    echo -n "$emoji" | xsel -b
fi

Closing this.

0xDaksh commented 4 years ago

A one liner with xclip could be:

bash -c "echo \$(jome) | xclip -selection clipboard"

Samuelfaure commented 1 year ago

A solution with wl-clipboard for Wayland:

jome | wl-copy