System-wide character-picker: emoji and unicode shell extensions for rofi
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

README.md 3.8KB

3年前
3年前
3年前
3年前
3年前
3年前
3年前
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # rofiemoji-rofiunicode
  2. Inspired by [fdw/rofimoji](https://github.com/fdw/rofimoji) and its script version [nkoehring/rofiemoji](https://github.com/nkoehring/rofiemoji), **rofiemoji-rofiunicode** is a fork of the latter that combines two scripts to search and copy emojis or unicode characters directly from [davatorium/rofi](https://github.com/davatorium/rofi). Unicode characters and emojis show up as separate tabs when rofi is invoked:
  3. ![rofiemoji-rofiunicode1](https://github.com/Kabouik/rofiemoji-rofiunicode/blob/master/rofiemoji-rofiunicode1.png?raw=true)
  4. ![rofiemoji-rofiunicode2](https://github.com/Kabouik/rofiemoji-rofiunicode/blob/master/rofiemoji-rofiunicode2.png?raw=true)
  5. `rofiemoji.sh` and `rofiunicode.sh` will try to download the lists of emoji and unicode characters when used the first time, unless the full repository has already been cloned using:
  6. ```bash
  7. cd ~/.config
  8. git clone https://github.com/Kabouik/rofiemoji-rofiunicode.git
  9. ```
  10. The list of unicode characters was originally created by [/u/fe80c0ffee](https://www.reddit.com/r/unixporn/comments/7zqkov/oc_i_mad_a_rofi_emoji_picker_and_i_feel_bad_about/duqls53?utm_source=share&utm_medium=web2x).
  11. ## Prerequisites
  12. * An emoji capable font, for example [Noto Emoji](https://www.google.com/get/noto/#emoji-zsye) or [Noto Color Emoji](https://www.google.com/get/noto/#emoji-zsye-color).
  13. * `xsel` to copy the selection to the clipboard. You should find it in your package manager.
  14. * `rofi` from [davatorium/rofi](https://github.com/davatorium/rofi) but probably available in your package manager as well.
  15. ## Usage example
  16. Add a custom keybinding using your window-manager settings for the following command:
  17. ```sh
  18. rofi -show windowcd -theme-str '#window{width: 30%;}' # See the rofi documentation for details
  19. ```
  20. Invoke rofi using your keybinding, navigate through tabs using `Ctrl+Tab` (default) and search emojis or unicode characters by keyword. Pressing `Return` will copy the highlighted character to the clipboard and close rofi.
  21. ## Recommended configuration
  22. For rofi to look like the above screenshots, use the supplied `config` file and `sidetab-adapta.rasi` theme (originally taken from the [davatorium/rofi-themes](https://raw.githubusercontent.com/davatorium/rofi-themes/master/User%20Themes/sidetab-adapta.rasi) collection). This can be done simply by running the following commands:
  23. ```bash
  24. mv $HOME/.config/rofi/config $HOME/.config/rofi/config.back
  25. cp $HOME/.config/rofiemoji-rofiunicode/config.example $HOME/.config/rofi/config
  26. mkdir -p $HOME/.local/share/rofi/themes
  27. cp $HOME/.config/rofiemoji-rofiunicode/sidetab-adapta.rasi $HOME/.local/share/rofi/themes/
  28. ```
  29. It is assumed, however, that `rofi/` and `rofiemoji-rofiunicode/` directories are both located in `~/.config/`.
  30. The `config` file supplied here is customized to my own preferences and to the characteristics of my system. Make sure you reviewed the few uncommented lines to check whether my changes will work on your system. For instance, this `config` file makes rofi work with gnome-terminal, but default rofi values might work best with other terminals.
  31. ## Alternative
  32. An alternative based on the original [rofimoji by fdw](https://github.com/fdw/rofimoji) instead of the [nkoehring/rofiemoji](https://github.com/nkoehring/rofiemoji) script version, but still with the addition of unicode characters from [/u/fe80c0ffee](https://www.reddit.com/r/unixporn/comments/7zqkov/oc_i_mad_a_rofi_emoji_picker_and_i_feel_bad_about/duqls53?utm_source=share&utm_medium=web2x), is [Kabouik/rofimoji](https://github.com/Kabouik/rofimoji). It allows multiple selection of emojis or unicode characters, as well as direct input without a clipboard step, but the customization possibilities are more limited and there is no visual unification with your main rofi instance.
  33. ![Kabouik/rofimoji](https://github.com/Kabouik/rofimoji/raw/master/screenshot-fork.png?raw=true)