Add alternative ways to insert emoji
First, the classical typing, our companion since v1.0 Secondly, the new "Copy to clipbard, paste and then restore the clipoard" to work around Firefox's problems. However, as `Ctrl+v` does not work with a console (and thus Vim), I changed it to use `Shift+Insert`. Unfortunately, this copies from both clipboard and primary depending on the application. To work around this (yay, recursive workarounds), we just spam both with our emoji and restore them later. What could go wrong? Also, we now allow choosing a method using cli args or different keybindings (`Alt+p` for copypasting, `Alt+t` for typing).
|2 years ago|
|.gitignore||3 years ago|
|CHANGELOG.md||2 years ago|
|LICENSE||3 years ago|
|README.md||2 years ago|
|extract_emojis.py||2 years ago|
|requirements-dev.txt||2 years ago|
|rofimoji.py||2 years ago|
|screenshot.png||3 years ago|
How often did you want to insert one of those Unicode emoji only to learn that there is no nice picker for Linux? Fear no more, this script uses the power of rofi to present exactly the picker you always wanted. Inserts the selected emoji directly, or copies it to the clipboard.
enterto insert the emoji directly \ Hit
alt+cto copy it to the clipboard \
alt+pcan be used to select a specific input method
For some applications,
xdotool cannot type emojis (f.e. Firefox). To work around this,
rofimoji can copy the emojis to your clipboard and insert them from there with
shift+insert. Afterwards, it will restore the previous contents.
Unfortunately, it depends on the receiving application whether
shift+insert uses the clipboard or the primary selection. Therefore,
rofimoji uses both and also restores both 😐.
xdotool type. To choose to spam your clipboards, you can either use the keybinding
alt+p or start it as
rofimoji --use-clipboard. If you want to use typing, you can hit
alt+t, even though it was started with
A kind soul has packaged it as rofimoji. To, install, use
sudo pacman -Syu rofimoji.
rofimoji.py and move it somewhere on your path, for example
What else do you need:
For Ubuntu zesty:
sudo aptitude install fonts-emojione python3 rofi xdotool xsel \
sudo pacman -Syu emoji-font python rofi xdotool xsel
This is only needed if a new Unicode version came out and you can’t wait for the official update!
pip install -r requirements-dev.txt
extract_emojis.py- this downloads the complete list from https://unicode.org/emoji/charts-12.0/full-emoji-list.html, so don’t do it too often!
emojis.pyshould have been created. Open it and copy the contents
rofimoji.pyand replace the emoji list with the contents of
Because now you only have to download one file, and it works Additionally, we need no separate I/O just to load the emojis. This is good, right?