Live data from Hacker News

Emotional about X11: I'm creating a pure X11 “emoji keyboard”

github.com

21–30 of 102 posts

Re: Emotional about X11: I'm creating a pure X11 “emoji keyboard”

#21
post #20

I just have this one liner for Wayland: cat ~/.local/share/emojis/emojis| wofi -i -d -M fuzzy -H 700 | cut -d " " -f 1 | tr -d '\040\011\012\015' | wtype - It shows an overlay fuzzy-searchable list of all emojis, and it writes selected one to the input regardless of the toolkit. assign it to a keyboard shortcut and you're good to go. the ~/.local/share/emojis/emojis file is just a list of all emojis: cat ~/.local/sha…

Note input is "out of scope" for wayland and XKB is used there for keyboard input as well. I just had a quick glance at "wtype" source and indeed, it fiddles with the keymap, using xkbcommon. So, assuming a suitable X11 replacement for this "wofi" tool, you could do exactly the same on X11 using "xdotool".

Re: Emotional about X11: I'm creating a pure X11 “emoji keyboard”

#22
post #20

I just have this one liner for Wayland: cat ~/.local/share/emojis/emojis| wofi -i -d -M fuzzy -H 700 | cut -d " " -f 1 | tr -d '\040\011\012\015' | wtype - It shows an overlay fuzzy-searchable list of all emojis, and it writes selected one to the input regardless of the toolkit. assign it to a keyboard shortcut and you're good to go. the ~/.local/share/emojis/emojis file is just a list of all emojis: cat ~/.local/sha…

And where can one obtain this `emojis` file?

Re: Emotional about X11: I'm creating a pure X11 “emoji keyboard”

#23
post #19

Unicode sucks. There is a glyph for a hammer, for a screwdriver, but not a soldering iron. During COVID, people were using a golf club as a substitute for a cotton swab. We now have generative AI that can make any desired emoticon you can dream of, except you can't use it because of Unicode.

Ya let's integrate gpu-accelerated emoji generation into unicode and require it everwhere, we can call it UTF-8B and standardize on 8GiB per character until that turns out not to be enough.

Re: Emotional about X11: I'm creating a pure X11 “emoji keyboard”

#24
post #20

I just have this one liner for Wayland: cat ~/.local/share/emojis/emojis| wofi -i -d -M fuzzy -H 700 | cut -d " " -f 1 | tr -d '\040\011\012\015' | wtype - It shows an overlay fuzzy-searchable list of all emojis, and it writes selected one to the input regardless of the toolkit. assign it to a keyboard shortcut and you're good to go. the ~/.local/share/emojis/emojis file is just a list of all emojis: cat ~/.local/sha…

[deleted]

Re: Emotional about X11: I'm creating a pure X11 “emoji keyboard”

#25

Writing a pure X11 application in 2024 is an interesting choice, given the recent push to Wayland. Nevertheless, it looks like a pretty cool tool!

The recent push to Wayland in 2024 is an interesting choice, given how productive and usable X11 is.

Re: Emotional about X11: I'm creating a pure X11 “emoji keyboard”

#26
post #5
post #4

Earlier quoted context omitted.

why not use xcompose?

Not sure you really mean the compose mechanism provided by Xlib (and xkbcommon etc ...)? If so, this wouldn't work for all these emojis that are represented by grapheme clusters, ZWJ-sequences or are just "qualified". The result of a compose sequence is limited to a single "key symbol", which can only encode a single unicode codepoint. Even for those emojis consisting of a singe codepoint, it would really miss the po…

> If so, this wouldn't work for all these emojis that are represented by grapheme clusters, ZWJ-sequences or are just "qualified". The result of a compose sequence is limited to a single "key symbol", which can only encode a single unicode codepoint.

I use the compose key as an abbreviation expander among other things. So far this works fine in all applications.

Though I don’t know if we’re talking about something beyond typing the XCompose sequence on the keyboard. If we’re talking about sending programmatic keypresses to applications like in this submission then I don’t know.

Re: Emotional about X11: I'm creating a pure X11 “emoji keyboard”

#27
post #22
post #20

I just have this one liner for Wayland: cat ~/.local/share/emojis/emojis| wofi -i -d -M fuzzy -H 700 | cut -d " " -f 1 | tr -d '\040\011\012\015' | wtype - It shows an overlay fuzzy-searchable list of all emojis, and it writes selected one to the input regardless of the toolkit. assign it to a keyboard shortcut and you're good to go. the ~/.local/share/emojis/emojis file is just a list of all emojis: cat ~/.local/sha…

And where can one obtain this `emojis` file?

You know, we should add an emojis dictionary to http://wordlist.aspell.net/ for exactly this purpose. Why not have a /usr/share/dict/emoji just like we have /usr/share/dict/words?

Re: Emotional about X11: I'm creating a pure X11 “emoji keyboard”

#28
post #22
post #20

I just have this one liner for Wayland: cat ~/.local/share/emojis/emojis| wofi -i -d -M fuzzy -H 700 | cut -d " " -f 1 | tr -d '\040\011\012\015' | wtype - It shows an overlay fuzzy-searchable list of all emojis, and it writes selected one to the input regardless of the toolkit. assign it to a keyboard shortcut and you're good to go. the ~/.local/share/emojis/emojis file is just a list of all emojis: cat ~/.local/sha…

And where can one obtain this `emojis` file?

here it is: https://gist.github.com/bjesus/4b447dcb8a272f4c795b78752acec...

Re: Emotional about X11: I'm creating a pure X11 “emoji keyboard”

#29
post #21
post #20

I just have this one liner for Wayland: cat ~/.local/share/emojis/emojis| wofi -i -d -M fuzzy -H 700 | cut -d " " -f 1 | tr -d '\040\011\012\015' | wtype - It shows an overlay fuzzy-searchable list of all emojis, and it writes selected one to the input regardless of the toolkit. assign it to a keyboard shortcut and you're good to go. the ~/.local/share/emojis/emojis file is just a list of all emojis: cat ~/.local/sha…

Note input is "out of scope" for wayland and XKB is used there for keyboard input as well. I just had a quick glance at "wtype" source and indeed, it fiddles with the keymap, using xkbcommon. So, assuming a suitable X11 replacement for this "wofi" tool, you could do exactly the same on X11 using "xdotool".

Indeed nothing special about Wayland for this, I have used `xdotool` in the old X11 days.

Re: Emotional about X11: I'm creating a pure X11 “emoji keyboard”

#30
post #20

I just have this one liner for Wayland: cat ~/.local/share/emojis/emojis| wofi -i -d -M fuzzy -H 700 | cut -d " " -f 1 | tr -d '\040\011\012\015' | wtype - It shows an overlay fuzzy-searchable list of all emojis, and it writes selected one to the input regardless of the toolkit. assign it to a keyboard shortcut and you're good to go. the ~/.local/share/emojis/emojis file is just a list of all emojis: cat ~/.local/sha…

I use rofi-emoji [0] on X11, and it's great.

[0]: https://github.com/Mange/rofi-emoji

Post reply on HN