Git Product home page Git Product logo

Comments (5)

arp242 avatar arp242 commented on May 18, 2024

The search command searches for codepoints; the emojis that are a single codepoint are returned by this, but those that consist of multiple aren't.

For example:

$ uni -q s flag
'⚐'  U+2690  9872   e2 9a 90    ⚐   WHITE FLAG (Other_Symbol)
'⚑'  U+2691  9873   e2 9a 91    ⚑   BLACK FLAG (Other_Symbol)

But the pirate flag emoji consists of multiple emojis:

$ uni e -qf '%(emoji) %(cpoint) %(name)' 'pirate flag'
🏴☠ U+1F3F4 U+200D U+2620 U+FE0F pirate flag

There is all sorts of special handling for emojis; I don't think combing them is a good idea.

As for your ballot box icon:

$ uni s ballot
     cpoint  dec    utf8        html       name (cat)
'☐'  U+2610  9744   e2 98 90    ☐   BALLOT BOX (Other_Symbol)
'☑'  U+2611  9745   e2 98 91    ☑   BALLOT BOX WITH CHECK (Other_Symbol)
'☒'  U+2612  9746   e2 98 92    ☒   BALLOT BOX WITH X (Other_Symbol)
'✗'  U+2717  10007  e2 9c 97    ✗    BALLOT X (Other_Symbol)
'✘'  U+2718  10008  e2 9c 98    ✘   HEAVY BALLOT X (Other_Symbol)
'⮽'  U+2BBD  11197  e2 ae bd    ⮽   BALLOT BOX WITH LIGHT X (Other_Symbol)
'🗳'  U+1F5F3 128499 f0 9f 97 b3 🗳  BALLOT BOX WITH BALLOT (Other_Symbol)
'🗴'  U+1F5F4 128500 f0 9f 97 b4 🗴  BALLOT SCRIPT X (Other_Symbol)
'🗵'  U+1F5F5 128501 f0 9f 97 b5 🗵  BALLOT BOX WITH SCRIPT X (Other_Symbol)
'🗶'  U+1F5F6 128502 f0 9f 97 b6 🗶  BALLOT BOLD SCRIPT X (Other_Symbol)
'🗷'  U+1F5F7 128503 f0 9f 97 b7 🗷  BALLOT BOX WITH BOLD SCRIPT X (Other_Symbol)
'🗹'  U+1F5F9 128505 f0 9f 97 b9 🗹  BALLOT BOX WITH BOLD CHECK (Other_Symbol)

That seems to work as expected, as it's a single codepoint? There is no special handling in print/search at all based on the character type, outside of formatting the control characters and combining characters. So I'm not sure what went wrong there?

from uni.

quite avatar quite commented on May 18, 2024

Sorry, I left out some information. What I really want is indeed to use uni to output all emojis, codepoints etc. Including names, so that I can pipe it all to bemenu (a dmenu for X/Wayland) and search incrementally...

from uni.

quite avatar quite commented on May 18, 2024

And yes, ballot was found by search all along :)

from uni.

arp242 avatar arp242 commented on May 18, 2024

I don't know; maybe it could be unified, but there's a lot of special handling involved, and there are probably a few UX issues that will crop up.

Considering that this is a tool I wrote for my own purposes and that overall I'm pretty happy with it as a user, the chance that I will work on this is very close to zero. I'm always happy to accommodate people's use cases, but there's a limit to the amount of work I'm willing to spend on that. Just want to be clear about expectations here 😅

I might consider merging patches, but that will depend a bit on whether I like the UI. Considering it would be a significant rewrite this actually might be better off as a fork (the amount of work is the same).

As a workaround, you can create a simple wrapper script which calls uni and pipe the output of that to bemenu.

from uni.

quite avatar quite commented on May 18, 2024

I realized that I can do something like that, yes. Combining output of uni -q emoji all and uni -q print all. Sry for taking your time.

from uni.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.