I am a developer who moved from Windows, to Linux, to macOS, to Linux. A typical developer’s journey 😆. So moving from windows to Linux was over 13-14 years ago. I didn’t do much from the windows world other than games and single executable files. But moving from macOS to Linux, has been a bit tough. KDE has been able to provide me with everything I want and more. The one thing that I missed the most was the emoji keyboard, with easy to launch shortcut.

My usage of emoji was at its peak during macOS days, I used emoji for my communications, commits, function name and even terminal aliases. 😈 Not everyone was a fan of my emoji usages, but I loved it.

After moving back to linux, I missed it quite a bit and always have been on the lookout for a good substitute. Today, I finally found it.

https://github.com/cspeterson/splatmoji

splatmoji

Now, KDE(Kubuntu) has an emoji selector/keyboard, but the flow is not the same as in macOS.

The workflow macOS has was:

  1. You press ctrl+shift+space
  2. The emoji keyboard opens
  3. You select the emoji you want
  4. Its pasted on the cursor location - be it terminal/document/anywhere that accepts text

Installation

I recommend installing it as a debian package and then customizing it.

1
2
3
sudo apt-get install xdotool rofi xsel
wget https://github.com/cspeterson/splatmoji/releases/download/v1.2.0/splatmoji_1.2.0_all.deb
sudo dpkg -i splatmoji_1.2.0_all.deb

Test it:

1
splatmoji copy

Now, once tested, we need to do some customization followed by setting up keyboard shortcut to launch it for easy access.

Customization

create the following file: .config/splatmoji/splatmoji.config

1
2
3
4
5
6
# history_file=~/.local/state/splatmoji/history
history_length=5
paste_command=xdotool key ctrl+shift+v
rofi_command=rofi -dmenu -p '' -i -monitor -2
xdotool_command=xdotool sleep 0.2 type --delay 100
xsel_command=xsel -b -i

I need this because ctrl+shift+v is paste for me and not the default ctrl+v

Setting up KDE Shortcut

  1. System Shortcuts > Custom Shortcuts

System Shortcuts > Custom Shortcuts

  1. Edit > New > Global Shortcut > Command/URL
  2. Give it a name or Emoji (or anything you like)
  3. Trigger (Trigger tab): set the short cut you want. I used ctrl+alt+space.

Trigger tab

  1. Action (Action tab): splatmoji copypaste

Action tab

More Emoji

Even though there are a lot of emojis in the repo, my usage requires more 😁. To feed one’s greed, they can create the following folder.

1
/home/coderhs/.local/share/splatmoji/data

Then place emojis inside a tsv file as follows. <Emoji source name>/<any_name>.tsv

A simple collection to add:

1
2
3
mkdir rofi-emoji
cd rofi-emoki
curl -fsSL https://raw.githubusercontent.com/Mange/rofi-emoji/master/all_emojis.txt > emoji.tsv

Final words

The only concern right now is I have too much steps, to make it the way I want. So I need to write a script to automate all the above steps. I need to find how to setup the keyboard shortcuts using command line, and I will publish the script.