Skip to content

Add Emoji & Symbols, a grid emoji picker - #73

Open
nchudleigh wants to merge 1 commit into
typecraft-dev:mainfrom
nchudleigh:feat/emoji-picker
Open

nchudleigh wants to merge 1 commit into
typecraft-dev:mainfrom
nchudleigh:feat/emoji-picker

Conversation

@nchudleigh

Copy link
Copy Markdown

Adds Emoji & Symbols (builtin:emoji-picker), modelled on Raycast's emoji picker.

What it does

  • 8-column grid. Sections: Pinned, Recently Used (ranked by frecency), then the Unicode categories. The selected emoji's name shows in the footer.
  • Arrow keys move around the grid. ↵ pastes into the active app, Ctrl+↵ copies, Ctrl+Shift+C copies the name, Ctrl+Shift+P pins, Ctrl+D removes from recents and Ctrl+Shift+D clears them (it asks first).
  • Skin tone is set from the action panel (Ctrl+K) and applies to the 323 emoji that take one.
  • Search runs on flea's engine through a second omacast-search helper over the emoji list. Without the helper it falls back to Emoji.matchScore, where whole words beat prefixes.
  • The omacast:emoji global shortcut opens it directly, e.g. o.bind("SUPER + CTRL + SPACE", "omacast emoji picker", hl.dsp.global("omacast:emoji")). setup hyprland doesn't bind it.
  • RPC: emojiPicker.search|get|pin|unpin|uprank|resetRanking|getSkinTone|setSkinTone.

Data

  • data/emoji.json: 1914 emoji built from Unicode 17 emoji-test.txt by bin/build-emoji.
  • Search keywords are read in place from Omarchy's shell/plugins/emojis/emojis.json, so none are copied into this repo.
  • Pins, recents and the skin tone are saved in db/emoji.json (0600, with a migration in core/Schema.js).

Speed: it opens in about 70 ms. Hiding the window drops its color-emoji glyph cache, so every open decodes the glyphs again. The grid sets the ListView's cacheBuffer to 0 so it decodes only the lines on screen; with the default it took 160–190 ms.

Not done: Unicode symbols, custom keywords, moving pins up and down, and a category dropdown.

Tests: tests/emoji.test.js (6 tests: parsing, ranking, sections, skin tone, grid packing, flea ordering). node --test tests/*.test.js: 144 pass, 3 skipped. omarchy plugin validate . passes.

The Herdr/terminal paste fix that ↵ needs is in #72.

🤖 Generated with Claude Code

An 8-column grid with Pinned, Recently Used and the Unicode categories.
Enter pastes, Ctrl+Enter copies, skin tone is set from the action panel.
Search runs on flea's engine through a second omacast-search helper.
The list is built from Unicode 17 emoji-test.txt by bin/build-emoji, with
keywords from Omarchy's emoji plugin. The omacast:emoji global shortcut
opens it directly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant