A simple emoji picker for rofi with multi-selection
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

README.md 3.0KB

před 2 roky
před 2 roky
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # Emoji-Picker
  2. How often did you want to insert one of those Unicode emoji only to learn that there is no nice picker for Linux?
  3. Fear no more, this script uses the power of [rofi](https://github.com/DaveDavenport/rofi/) to present exactly the picker you always wanted.
  4. Inserts the selected emoji directly, or copies it to the clipboard.
  5. ## Usage
  6. 1. Run `rofimoji.py`
  7. 2. Search for the emoji you want
  8. 3. (optional) Select multiple emoji with `shift+enter`
  9. 4. Hit `enter` to insert the emoji directly \
  10. Hit `alt+c` to copy it to the clipboard \
  11. `alt+t` or `alt+p` can be used to select a specific input method
  12. 5. Maybe select a skin color
  13. 6. 🎠
  14. ## How does it look?
  15. ![Screenshot of rofimoji](screenshot.png?raw=true)
  16. ## Insertion method
  17. 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.
  18. 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 😐.
  19. By default, `rofimoji` uses `xdotool type`. To choose to spam your clipboards, you can either use the keybinding `alt+p` or start it as `rofimoji --use-clipboard` (`-c` (`-c`)). If you want to use typing, you can hit `alt+t`, even though it was started with `--use-clipboard`.
  20. ## Configuration
  21. You can choose a skin tone with the `--skin-tone` (or `-s`) parameter. The available values are `light`, `medium-light`, `moderate`, `dark brown`, `black`, as well as `neutral` and `ask` to be shown the prompt (this is also the default).
  22. ## Installation
  23. ### Arch
  24. A kind soul has packaged it as [rofimoji](https://www.archlinux.org/packages/community/any/rofimoji/). To, install, use `sudo pacman -Syu rofimoji`.
  25. ### From sources
  26. Download `rofimoji.py` and move it somewhere on your path, for example `/usr/local/bin`.
  27. What else do you need:
  28. - Python 3
  29. - A font that can display emoji, for example [EmojiOne](https://github.com/emojione/emojione) or [Noto Emoji](https://www.google.com/get/noto/)
  30. - xdotool for typing the emoji
  31. - xsel to copy the emoji to the clipboard
  32. For Ubuntu zesty: `sudo aptitude install fonts-emojione python3 rofi xdotool xsel` \
  33. For Arch: `sudo pacman -Syu emoji-font python rofi xdotool xsel`
  34. ## Updating the emojis
  35. This is only needed if a new Unicode version came out and you can't wait for the official update!
  36. 1. Install Python 3 and `pip install -r requirements-dev.txt`
  37. 2. Run `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!
  38. 3. A new file `emojis.py` should have been created. Open it and copy the contents
  39. 4. Open `rofimoji.py` and replace the emoji list with the contents of `emojis.py`
  40. ## FAQ
  41. ### Why is it so pedestrian? Why not simply import from `emojis.py`?
  42. Because now you only have to download one file, and it works 
  43. Additionally, we need no separate I/O just to load the emojis. This is good, right?