GitHub - eepp/jome: A ⌨️ centric emoji picker πŸ–₯️ application

jome 😏

GitHub Release AUR Version GitHub License GitHub Repo stars

jome (johΒ·mee) is a ⌨️ centric emoji picker πŸ–₯️ application.

You can also pick an emoji with the πŸ–±οΈ, don’t worry.

jome has all the emojis of ⬆️ to Emoji 16.0, including with skin tones.

I’m not a fan of the usual very broad categories of emojis which do not intersect so I made my own categories. A given emoji can be found in more than 1️⃣ category. For example, 🦈 is found in both the animals (no faces) and water categories. I find that it’s easier to πŸ” by theme than by very general category. Feel πŸ†“ to suggest more categories.

jome is currently only tested on 🐧.

Preview

Default view

all

🌚 mode

dark

Specific category

animals

πŸ” emojis matching β€œpalm”

palm

πŸ” emojis matching β€œwom”

wom

πŸ” emojis matching β€œwom” and β€œfact”

wom fact

πŸ” all emojis of the transportation category

transp cat

πŸ” emojis matching β€œboa” within the transportation category

transp cat boa

πŸ” emojis matching β€œboa” and β€œsa” within the transportation category

transp cat boa sa

If you prefer a minimal look

minimal

This is

Options: -d, -C, -L, -R, -k, and -w.

πŸ— jome

You need:

  • CMake β‰₯ 3.30.0

  • A C++14 compiler

  • Boost β‰₯ 1.70 (only to πŸ—)

  • JSON for Modern C++ (only to πŸ—, automatically πŸ“₯ by CMake if not found locally)

  • {fmt} (only to πŸ—, automatically πŸ“₯ by CMake if not found locally)

  • Qt 5 (Core, GUI, Widgets, and Network modules)

πŸ— jome

$ mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=release .. && make -j$(nproc)

Note

You need to install jome for it to find the correct data πŸ“„. If you don’t want to install it on your system, use -DCMAKE_INSTALL_PREFIX=path/to/install/directory when you run cmake.

Install on Arch Linux

To install on Arch Linux from the jome AUR package:

Usage

jome’s purpose is to help you pick an emoji. In other words, it doesn’t really care what you do with the chosen emoji afterwards: you can leverage πŸ› οΈ such as xdotool(1) to β€œtype” it or xsel(1) to copy it to the πŸ“‹. See ⌨️ the βœ… emoji and the -c option for a starting point.

When you βœ… an emoji (with the ⌨️ or with the πŸ–±οΈ), jome πŸ–¨οΈ the UTF-8 emoji or the Unicode codepoints (πŸ‘€ the -f option), with an optional prefix (πŸ‘€ the -p option) for each codepoint, to the standard output. Additionally, jome can:

  • Copy the UTF-8 emoji or the Unicode codepoints to the πŸ“‹. πŸ‘€ the -b option.

  • Execute a custom command which πŸ“¨ the UTF-8 emoji or the Unicode codepoints, with an optional prefix for each codepoint, as its last argument(s). πŸ‘€ the -c option.

  • Send the UTF-8 emoji or the Unicode codepoints, with an optional prefix for each codepoint, in response to a client which requested picking an emoji. πŸ‘€ the -s option.

If you close the πŸͺŸ (you can πŸ‘‡ Escape or Ctrl+C to do this), then jome πŸ–¨οΈ nothing to the standard output and executes nothing.

If you don’t start jome in server mode (-s option) and you don’t specify the -q option, then jome immediately πŸ‘‹ after you βœ… an emoji or close the πŸͺŸ.

Graphical interface

all

There are 4️⃣ sections:

πŸ” box (⬆️)

Input box where you can ⌨️ a query to πŸ” emojis.

Emoji grid

All emojis (with an empty πŸ” box) or πŸ” results.

When there’s at least 1️⃣ emoji, there’s always a selected emoji with a πŸ”² box around it.

πŸ–±οΈ an emoji to βœ… it. Press Shift when clicking to don’t πŸ–¨οΈ VS-16 codepoints (see the -V option).

Hover an emoji to update the ⬇️ emoji info text temporarily.

Make the background behind emojis 🌚 with the -d option.

πŸ™ˆ the category 🏷️ with the -L option.

πŸ™ˆ the β€œRecent” category with the -R option.

Category πŸ“œ

πŸ“œ of available categories.

When all emojis are πŸ‘οΈ (the πŸ” box is empty), πŸ–±οΈ a category name to scroll to this emoji category.

The first category, β€œRecent”, is a special category with the recently βœ… emojis.

Use the -H option to override the maximum number of recently βœ… emojis.

πŸ™ˆ the β€œRecent” category with the -R option.

πŸ™ˆ the whole category πŸ“œ with the -C option.

Emoji info text (⬇️)

Name, Unicode codepoints, Emoji standard version, and keywords of the selected or hovered emoji.

πŸ™ˆ the keyword list πŸ“œ with the -k option.

πŸ” emojis

The power of jome is its πŸ” box.

When you launch jome, the πŸ” box is focused, and it should stay focused unless you browse emojis manually with the intention of βœ… one with the πŸ–±οΈ.

The format of a query is 1️⃣ of:

  • TERMS

  • CAT/

  • CAT/TERMS

  • CODEPOINT

  • CAT/CODEPOINT

where:

CAT

Partial name of categories in which to πŸ”.

TERMS

Space-separated πŸ“œ of πŸ” terms.

For an emoji to be part of the results, its name and keywords must contain all the πŸ” terms.

CODEPOINT

A single Unicode codepoint using the standard U+ABCD notation.

Everything is πŸ’Ό-insensitive.

Select and βœ… an emoji

To select an emoji, use the following ⌨️:

⬅️, ➑️, ⬆️, ⬇️

Go ⬅️/➑️/⬆️/⬇️.

Ctrl+⬅️, Ctrl+➑️

Go ⬅️/➑️ 5️⃣ emojis.

Page ⬆️, Page ⬇️

Go ⬆️/⬇️ 10 rows.

Home

Go to the first emoji.

End

Go to the last emoji.

To βœ… the selected emoji, πŸ‘‡:

Enter

βœ… the selected emoji with, if applicable:

Without the -t option

No skin tone (🟑).

With the -t option

The default skin tone (value of -t).

Shift+Enter

Like Enter, but do not πŸ–¨οΈ VS-16 codepoints.

See the -V option option.

F1
F2
F3
F4
F5

If the selected emoji supports skin tones, βœ… the selected emoji with a light, medium-light, medium, medium-dark, or dark skin tone, overriding the -t option (if any).

Shift+F1
Shift+F2
Shift+F3
Shift+F4
Shift+F5

Like F1 to F5, but do not πŸ–¨οΈ VS-16 codepoints.

See the -V option option.

To ❌, πŸ‘‡ Escape or Ctrl+C, or close the πŸͺŸ.

Go to Emojipedia page

To go to the Emojipedia 🌐 of the selected emoji, πŸ‘‡ F12.

To go to the Emojipedia 🌐 of any emoji with the πŸ–±οΈ, right-click it and click β€œGo to Emojipedia page”.

πŸ‘€-defined emoji keywords

You can either replace or βž• the built-in πŸ“œ of keywords which jome searches when πŸ” emojis.

To set πŸ‘€-defined keywords, create an emojis.json πŸ“„ within:

On 🐧

~/.config/jome/

On 🍎

~/Library/Preferences/jome

On πŸͺŸ

C:/Users/USERNAME/AppData/Local/jome (probably) or C:/ProgramData/jome

emojis.json must contain a JSON object where πŸ”‘ are emojis and values are objects. Each value may contain one of:

keywords

An array of keywords which replaces the built-in keywords entirely for this emoji.

extra-keywords

An array of keywords which βž• either the built-in keywords or the keywords of the keywords entry for this emoji.

Example:

{
  "🍁": {
    "extra-keywords": ["canada", "laurentides"]
  },
  "πŸ˜ƒ": {
    "keywords": ["yay", "hourra"]
  },
  "🚬": {
    "extra-keywords": ["claude poirier"]
  },
  "🫚": {
    "extra-keywords": ["canada dry", "martin deschamps"]
  }
}

Server mode

jome features a server mode to avoid creating a process (a Qt πŸͺŸ can be quite long to create) every ⌚ you need to pick an emoji. With this mode, you can πŸ‘οΈ the jome πŸͺŸ instantaneously.

To start jome in server mode, use the -s option to specify the server name:

This creates a local server named mein-server. On Unix, it creates the socket πŸ“„ /tmp/mein-server.

Important

On Unix, the server mode won’t work if the socket πŸ“„ already exists. Remove the πŸ“„ before you start jome in server mode:

$ rm -f /tmp/mein-server
$ jome -s mein-server

When jome starts in server mode, it doesn’t πŸ‘οΈ its πŸͺŸ. Instead, it βŒ› for a command sent by the client, jome-ctl. To πŸ‘οΈ the πŸͺŸ:

When you βœ… an emoji, jome-ctl πŸ–¨οΈ what jome also πŸ–¨οΈ to the standard output and πŸ‘‹ with exit code 0️⃣. Therefore, the output format of jome-ctl is πŸŽ› by the options passed to jome.

If you ❌ jome (πŸ‘‡ Escape or Ctrl+C, or close the πŸͺŸ), jome-ctl πŸ–¨οΈ nothing and returns with exit code 1️⃣.

In server mode, jome doesn’t πŸ‘‹ once you βœ… an emoji or ❌: it πŸ™ˆ the πŸͺŸ and keeps πŸ‘‚. To make it πŸ‘‹ gracefully, which also removes the socket πŸ“„:

$ jome-ctl mein-server quit

You don’t need to use what jome-ctl πŸ–¨οΈ to the standard output. You can use jome in server mode with the -c option to make jome execute a command itself. For example:

$ rm -f /tmp/mein-server
$ jome -s mein-server -c 'xdotool type'

Then, bind a ⌨️ shortcut to:

Command-line options

Option Description

-f FMT

Set the output format to FMT:

utf-8 (default)

UTF-8 emoji.

cp

Space-separated Unicode codepoints (hexadecimal).

Example: 1f645 200d 2642 fe0f

Prepend a prefix to each codepoint with -p.

-p PREFIX

Set the prefix to be prepended to each Unicode codepoint with -f cp.

For example, with -f cp and -p U+:

U+1f645 U+200d U+2642 U+fe0f

-n

Do not πŸ–¨οΈ a newline after πŸ–¨οΈ the emoji or codepoints.

-V

Do not πŸ–¨οΈ Variation Selector-16 (VS-16) codepoints.

VS-16 is a suffix codepoint which specifies that the preceding character should be displayed with emoji presentation. For example, β™₯ (which predates Unicode emojis) followed with VS-16 becomes β™₯️.

There are applications/fonts which don’t like VS-16.

-t TONE

Set the default skin tone to TONE instead of none:

L

Light.

ML

Medium-light.

M

Medium.

MD

Medium-dark.

D

Dark.

The F1 to F5 keys still βœ… an emoji with a specific skin tone.

-c CMD

When you βœ… an emoji, execute the command CMD 20 ms after closing the jome πŸͺŸ.

jome interprets CMD like a 🐚 does, so you can have arguments too.

CMD πŸ“¨ the UTF-8 emoji or the Unicode codepoints (depending on the -f option) with their optional prefix as its last argument(s).

Examples with xdotool:

$ jome -c 'xdotool type'
$ jome -f cp -p U -c 'xdotool key --delay 20'

-b

When you βœ… an emoji, copy the UTF-8 emoji or the Unicode codepoints (depending on the -f option) to the πŸ“‹.

Warning

This uses QClipboard and is known not to always work, depending on your πŸͺŸ πŸ§‘β€πŸ’Ό.

-q

Do not πŸ‘‹ when you βœ… an emoji.

By default, when you βœ… an emoji (with the ⌨️ or with the πŸ–±οΈ), jome:

  1. πŸ–¨οΈ the βœ… emoji or its codepoints to the standard output.

  2. πŸ™ˆ its πŸͺŸ.

  3. Optional: Copies the βœ… emoji/codepoints to the πŸ“‹ (πŸ‘€ the -b option).

  4. Optional: Executes a command (πŸ‘€ the -c option) after 20 ms.

  5. If not running in server mode, πŸ‘‹ (πŸ‘€ the -s option).

With the -q option, jome doesn’t πŸ™ˆ its πŸͺŸ and doesn’t πŸ‘‹ when you βœ… an emoji so that you can make it πŸ–¨οΈ multiple emojis and/or execute a command multiple ⌚ with multiple emojis without restarting the application.

You cannot specify the -q and -s options at the same βŒš.

-s NAME

Start jome in server mode and set the server name to NAME.

On Unix, this creates the socket πŸ“„ /tmp/NAME which must not exist before you start jome.

You cannot specify the -s and -q options at the same βŒš.

-d

Use a 🌚 background for emojis.

-C

πŸ™ˆ the category πŸ“œ.

-L

πŸ™ˆ the category 🏷️ in the emoji grid.

-R

πŸ™ˆ the β€œRecent” category.

-r

Include the recently accepted emojis in the results when πŸ” emojis.

In this πŸ’Ό, jome πŸ‘οΈ the recently accepted emojis first within the result grid.

-k

πŸ™ˆ the keyword πŸ“œ.

-w WIDTH

Set the width of individual emojis to WIDTH pixels, amongst 16, 24, 32 (default), 40, or 48.

-P PERIOD

Set the flashing period of the selection πŸ”² to PERIOD ms (greater than or equal to 32).

The selection πŸ”² doesn’t flash by default.

-H COUNT

Set the maximum number of recently βœ… emojis to COUNT instead of 30.

⌨️ the βœ… emoji

Here are Bash πŸ“œ to ⌨️ the βœ… emoji with xdotool.

Direct mode

With xdotool key
#!/usr/bin/bash

codepoints=$(jome -f cp -p U)

if (($? != 0)); then
    exit 1
fi

xdotool key --delay 20 "$codepoints"
With xdotool type
#!/usr/bin/bash

emoji=$(jome)

if (($? != 0)); then
    exit 1
fi

xdotool type "$emoji"

Server mode

With xdotool key
#!/usr/bin/bash

socket_name=jome.socket.$(id -u)

if [[ ! -e "/tmp/$socket_name" ]]; then
    jome -s "$socket_name" -n -w48 -f cp -p U & disown

    until [[ -e "/tmp/$socket_name" ]]; do
        sleep .1
    done
fi

codepoints=$(jome-ctl "$socket_name")

if (($? == 0)); then
    sleep .02
    xdotool key --delay 20 "$codepoints"
fi
With xdotool type
#!/usr/bin/bash

socket_name=jome.socket.$(id -u)

if [[ ! -e "/tmp/$socket_name" ]]; then
    jome -s "$socket_name" -n -w48 & disown

    until [[ -e "/tmp/$socket_name" ]]; do
        sleep .1
    done
fi

emoji=$(jome-ctl "$socket_name")

if (($? == 0)); then
    sleep .02
    xdotool type "$emoji"
fi