Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/eepp/jome

An emoji picker desktop application
https://github.com/eepp/jome

emoji emoji-keyboard emoji-picker emoji-searcher emojis

Last synced: 3 months ago
JSON representation

An emoji picker desktop application

Awesome Lists containing this project

README

        

= jome ๐Ÿ˜
Philippe Proulx
:toc: left
:icons: font
:nofooter:

**jome** (_joh_ยท_mee_) is a โŒจ๏ธ centric emoji picker ๐Ÿ–ฅ application.

You can also pick an emoji with the ๐Ÿ–ฑ, don't worry.

jome has most of the interesting emojis of
https://emojipedia.org/emoji-14.0/[Emoji{nbsp}14.0].

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

image::screenshots/all.png[]

image::screenshots/palm.png[]

image::screenshots/wom.png[]

image::screenshots/wom-fact.png[]

image::screenshots/transp-cat.png[]

image::screenshots/transp-cat-car.png[]

image::screenshots/transp-cat-car-lig.png[]

[[build]]
== ๐Ÿ—

You need:

* https://cmake.org/[CMake] โ‰ฅ 3.1.0
* A {cpp}14 compiler
* http://www.boost.org/[Boost] โ‰ฅ 1.58 (only to ๐Ÿ—)
* 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 jome
----
$ sudo make install
----

== Install on Arch Linux

To install on Arch Linux from the
https://aur.archlinux.org/packages/jome-git[jome-git] AUR package:

----
$ yay -Sy jome-git
----

== Usage

jome's purpose is to help you _pick_ an emoji.

When you <> an emoji (with the โŒจ๏ธ or with the ๐Ÿ–ฑ),
jome ๐Ÿ–จ the UTF-8 emoji or the Unicode codepoints (see the
<>), with an optional prefix (see the
<>) for each codepoint, to the standard output.
Additionally, jome can:

* Copy the UTF-8 emoji or the Unicode codepoints to the clipboard. See
the <>.

* Execute a custom command which receives the UTF-8 emoji or the Unicode
codepoints, with an optional prefix for each codepoint, as its
last argument(s). See the <>.

* 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. See the <>.

If you close the ๐ŸชŸ (you can ๐Ÿ‘‡ **Escape** to do this), then jome ๐Ÿ–จ
nothing to the standard output and executes nothing.

If you don't start jome in <>
(<>) and you don't specify the
<>, then jome immediately quits after you accept
an emoji or close the ๐ŸชŸ.

=== Graphical interface

image::screenshots/all.png[]

There are 4๏ธโƒฃ sections:

[[find-box]]๐Ÿ” box (โฌ†๏ธ)::
Input box where you can โŒจ๏ธ a query to <>.

Emojis::
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 accept it.
+
Hover an emoji to update the โฌ‡๏ธ emoji info text temporarily.
+
Use the <> to make the background behind emojis
dark.

Category list::
List 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
accepted emojis.

Emoji info text (โฌ‡๏ธ)::
Name, Unicode codepoints, and Emoji version of the selected or
hovered emoji.

[[find-emojis]]
=== ๐Ÿ” emojis

The power of jome is its <>.

When you launch jome, the ๐Ÿ” box is focused, and it should stay
focused unless you browse emojis manually with the intention of
accepting one with the ๐Ÿ–ฑ.

The format of a query is 1๏ธโƒฃ of:

* `_TERMS_`
* `_CAT_/`
* `_CAT_/_TERMS_`

where:

`_CAT_`::
Partial name of categories in which to ๐Ÿ”.

`_TERMS_`::
Space-separated list of ๐Ÿ” terms.
+
For an emoji to be part of the results, at least 1๏ธโƒฃ of its keywords
must contain _all_ the ๐Ÿ” terms.

[[select]]
=== Select and accept an emoji

To select an emoji, use the following โŒจ๏ธ:

โฌ…๏ธ, โžก๏ธ, โฌ†๏ธ, โฌ‡๏ธ::
Go โฌ…๏ธ/โžก๏ธ/โฌ†๏ธ/โฌ‡๏ธ.

**Ctrl**pass:[+]โฌ…๏ธ, **Ctrl**pass:[+]โžก๏ธ::
Go โฌ…๏ธ/โžก๏ธ 5๏ธโƒฃ emojis.

**Page โฌ†๏ธ**, **Page โฌ‡๏ธ**::
Go โฌ†๏ธ/โฌ‡๏ธ 10 rows.

**Home**::
Go to the first emoji.

**End**::
Go to the last emoji.

[[accept-emoji]]To accept the selected emoji, ๐Ÿ‘‡:

**Enter**::
Accept the selected emoji with the default skin tone
(if applicable).

**F1**, **F2**, **F3**, **F4**, **F5**::
If the selected emoji supports skin tones, accept the selected
emoji with a light, medium-light, medium, medium-dark, or dark
skin tone.

To cancel, ๐Ÿ‘‡ **Escape** or close the ๐ŸชŸ.

=== Go to Emojipedia page

To go to the https://emojipedia.org/[Emojipedia] ๐Ÿ“ƒ of the
<> emoji, ๐Ÿ‘‡ **F12**.

To go to the Emojipedia ๐Ÿ“ƒ of any emoji with the ๐Ÿ–ฑ, right-click it and
click "`Go to Emojipedia page`".

[[cl-options]]
=== Command-line options

[[opt-f]]`-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`
--

[[opt-p]]`-p _PREFIX_`::
Set the prefix to be prepended to each Unicode codepoint.
+
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.

[[opt-c]]`-c _CMD_`::
When you accept an emoji, execute command `_CMD_` 20{nbsp}ms
_after_ closing the jome ๐ŸชŸ.
+
jome interprets `_CMD_` like a ๐Ÿš does, so you can have arguments
too.
+
`_CMD_` receives the UTF-8 emoji or the Unicode codepoints (depending on
the <>) with their optional prefix as its last
argument(s).
+
Examples with https://www.semicomplete.com/projects/xdotool/[xdotool]:
+
----
$ jome -c 'xdotool type'
$ jome -f cp -p U -c 'xdotool key --delay 20'
----

[[opt-b]]`-b`::
When you accept an emoji, copy the UTF-8 emoji or the Unicode
codepoints (depending on the <>) to the ๐Ÿ“‹.

[[opt-q]]`-q`::
Do not quit when you <> an emoji.
+
By default, when you accept an emoji (with the โŒจ๏ธ or with the ๐Ÿ–ฑ), jome:
+
--
. ๐Ÿ–จ the accepted emoji or its codepoints to the standard output.
. Hides its ๐ŸชŸ.
. **Optional**: Copies the accepted emoji/codepoints to the
clipboard (see the <>).
. **Optional**: Executes a command (see the <>)
after 20{nbsp}ms.
. **If not running in server mode**, quits (see the
<>).
--
+
With the `-q`{nbsp}option, jome does not hide its ๐ŸชŸ and does not quit
when you accept 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 <>{nbsp}options at the same
โฒ.

[[opt-s]]`-s _NAME_`::
Start jome in <> 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 <>{nbsp}options at the same
โฒ.

[[opt-d]]`-d`::
Use a dark background for emojis.

[[opt-w]]`-w _WIDTH_`::
Set the width of individual emojis to `_WIDTH_`{nbsp}pixels, amongst
16, 24, 32 (default), 40, or 48.

[[server-mode]]
=== 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 <> to
specify the server name:

----
$ jome -s mein-server
----

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 does not ๐Ÿ‘ its ๐ŸชŸ. Instead,
it โŒ› for a command sent by the client, `jome-ctl`. To ๐Ÿ‘ the
๐ŸชŸ:

----
$ jome-ctl mein-server
----

When you <> an emoji, `jome-ctl` ๐Ÿ–จ what jome
also ๐Ÿ–จ to the standard output and quits with exit code 0๏ธโƒฃ.
Therefore, the output format of `jome-ctl` is ๐ŸŽ› by the
<> passed to `jome`.

If you cancel jome (press **Escape** or close the ๐ŸชŸ), `jome-ctl`
๐Ÿ–จ nothing and returns with exit code 1๏ธโƒฃ.

In server mode, jome does not quit once you accept an emoji or cancel:
it hides the ๐ŸชŸ and keeps ๐Ÿ‘‚. To make it quit 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 <> to make jome
execute a command itself. For example:

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

Then, bind a โŒจ๏ธ shortcut to:

----
$ jome-ctl mein-server
----

== โŒจ๏ธ the accepted emoji

Here are Bash ๐Ÿ“œ to โŒจ๏ธ the accepted emoji with
https://www.semicomplete.com/projects/xdotool/[xdotool].

=== Non server mode

With `xdotool key`::
+
[source,bash]
----
#!/usr/bin/bash

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

if [ $? -ne 0 ]; then
exit 1
fi

xdotool key --delay 20 $codepoints
----

With `xdotool type`::
+
[source,bash]
----
#!/usr/bin/bash

emoji="$(jome)"

if [ $? -ne 0 ]; then
exit 1
fi

xdotool type "$emoji"
----

=== Server mode

With `xdotool key`::
+
[source,bash]
----
#!/usr/bin/bash

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

if ! pidof jome &>/dev/null; then
rm -f "/tmp/$socket_name"
jome -s "$socket_name" -f cp -p U -c 'xdotool key --delay 20' & disown

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

jome-ctl "$socket_name"
----

With `xdotool type`::
+
[source,bash]
----
#!/usr/bin/bash

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

if ! pidof jome &>/dev/null; then
rm -f "/tmp/$socket_name"
jome -s "$socket_name" -c 'xdotool type' & disown

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

jome-ctl "$socket_name"
----