Mange / rofi-emoji

Emoji selector plugin for Rofi
MIT License
555 stars 26 forks source link

Add basic text emojis #48

Closed stmswitcher closed 2 years ago

stmswitcher commented 2 years ago

Hey @Mange!

Thanks a lot for your work! I do use your plugin in my daily work quite often, but there is one thing I really miss: the text representation of a shrug 😅

Could you please consider this PR?

Mange commented 2 years ago

Sorry, no. That file is autogenerated from the official Emoji database and would be overwritten the next time The Unicode Consortium releases new emojis.

You can make this work by having your own overrides in a file somewhere and join them together when you start Rofi. See the section about having a custom database in the Readme.

If you need a more direct example, let me know and I'll write one for you when I'm back at a keyboard! 😄

stmswitcher commented 2 years ago

Ah, alright. Didn't think it was automatically generated. Sure, I'll go with additional local dictionary approach then!

Mange commented 2 years ago

I've decided to make an example anyway. Here's how you, dear reader, can achieve the same thing! :muscle:

  1. Create a DB file of your custom selection and save in ~/.config/rofi-emoji/custom.txt.

    Here's an example for you to use.

    ( ͡° ͜ʖ ͡°)  Smilies Internet Memes  Lenny   Smirk | horny | surprised | you-know-what

    See the README for information about the format and note that there are raw tab characters between the different fields in this file.

  2. Run rofi with some extra arguments:

    rofi \
     -modi emoji \
     -show emoji \
     -emoji-file <(cat /usr/local/share/rofi-emoji/all_emojis.txt ~/.config/rofi-emoji/custom.txt)
  3. Create your custom command to make this easier in the future (~/.local/bin/rofi-emoji)

    #!/usr/bin/env bash
    
    exec rofi \
     -modi emoji \
     -show emoji \
     -emoji-file <(cat /usr/local/share/rofi-emoji/all_emojis.txt ~/.config/rofi-emoji/custom.txt) \
     "$@"

    If you have ~/.local/bin in your $PATH, then you can just run rofi-emoji to get it with your custom additions added!

Screenshots

rofi-2022-08-24-2108-00000 rofi-2022-08-24-2108-00001

Mange commented 2 years ago

I converted the above comment into a Discussion so others might find it useful. I also expanded the explanations a bit.

https://github.com/Mange/rofi-emoji/discussions/50

If you have a good file example to include here, feel free to post it on the discussion.