/now
projects
ramblings
smol projects

shmojis - emojis in the terminal!

20.08.2023 2 min read

I was browsing Github when I came across shmoji, which lets you pick emojis right from your CLI! If I sound more excited about this than I should be, it’s because I am. I used to have a keyboard shortcut to bring up the emoji picker on Windows, but I ran a fresh install and haven’t been able to get it back. Also, I hate going to the Emojipedia web site because it keeps asking me to disable my ad block 💢 So this will do nicely.

First, we’ll need the script:

$ wget https://raw.githubusercontent.com/biox/shmoji/main/shmoji

Next, we’ll need to install fzf if it isn’t already installed.

$ sudo apt install fzf

Then, give shmoji permissions:

$ chmod +x ./shmoji

Download emojis:

$ ./shmoji download

We’re finally ready!

$ ./shmoji fzf                                                                                    
# choose an emoji from the interactive prompt

This is great, but we can do better - we don’t want to keep typing ./. It’d also be nice to copy the emoji to the clipboard automatically.

So, we’ll add it to somewhere in $PATH, and alias it as such:

# in ~/.zshrc
# Create an alias for the shmoji command that copies the selection to the clipbaord
alias shmoji="shmoji fzf | xclip -selection clipboard"
source ~/.zshrc # reload ~/.zshrc so we can use the alias
$ shmoji

Beautiful 😍

Built with Astro and Tailwind 🚀