maoschanz / emoji-selector-for-gnome

This extension provide a popup menu with some emojis ; clicking on an emoji copies it to the clipboard.
GNU General Public License v3.0
475 stars 76 forks source link

Add GNOME 40 support in the extensions prefs window #149

Closed frandieguez closed 2 years ago

frandieguez commented 3 years ago

Hi,

please consider merging this PR to add support to GNOME 40 in the preferences page of this extension.

There are some parts that are visually more appealing but there are some rough parts that I'm not particularly happy about.

image

Regards, Fran

yavko commented 2 years ago

native way to insert emojis using Ctrl+; and Ctrl+.

Whoa, thanks. I might be able to drop this extension now. Unfortunately, it appears to be GTK-specific, so it won’t work in Qt or Electron apps, and it doesn’t appear to be enabled in Firefox1, either.

Footnotes

1. [1232371 - [UX] Emoji picker for all platforms](https://bugzilla.mozilla.org/show_bug.cgi?id=1232371) [leftwards_arrow_with_hook](#user-content-fnref-1-5e2c1fc277d50183a43a3d54d402f7b6)

Try with ibus

EDIT: type ibus-setup in the terminal and find the key bind, then use that keybind and you will see an e, type the emoji name, then press space and then enter.

DZPM commented 2 years ago

The "native" ways don't work with Firefox & Chrome. We spend most of the time on our browsers, so we need a proper way to add emojis.

As an alternative, I'm using/evaluating:

raphink commented 2 years ago

The native way works in Chrome and Firefox on my Ubuntu 22.04.

Iirc I had to adjust some environment variables. Not sure if anything else was required:

GTK_IM_MODULE=ibus
QT_IM_MODULE=ibus
XMODIFIERS=@im=ibus
ccoenen commented 2 years ago

Sadly "I just had to" is only obvious in hindsight. If this does not work by default, it's really still broken. Thank you for the solution, though!

AlexWayfer commented 2 years ago

The "native" ways don't work with Firefox & Chrome. We spend most of the time on our browsers, so we need a proper way to add emojis.

As an alternative, I'm using/evaluating:

For me, it works in Chrome, even in Atom Editor. I just was unable to realize what underscored e means, I guessed it's some weird tech input enabling by occasional Ctrl+.. @raphink helped me to realize that this is just a (weird?) input for emoji auto-completion.

(without any env vars)

BTW I had problems with Emote installation, and have not seen Smile, but I'll look at them, thank you.

raphink commented 2 years ago

Yes, that underscored e syntax is quiet weird. Btw, you can also tune its behavior by launching ibus-setup, for example so that it matches emojis containing the text you typed instead of the exact match:

image

yavko commented 2 years ago

Yes, that underscored e syntax is quiet weird. Btw, you can also tune its behavior by launching ibus-setup, for example so that it matches emojis containing the text you typed instead of the exact match:

image

There is also a popup menu for that thingy, I think its if you press space twice idk I forgot

DZPM commented 2 years ago

The native way works in Chrome and Firefox on my Ubuntu 22.04.

Iirc I had to adjust some environment variables. Not sure if anything else was required:

GTK_IM_MODULE=ibus
QT_IM_MODULE=ibus
XMODIFIERS=@im=ibus

Unlucky me, I can't make it work. The env variables are set, I've rebooted, but still nothing.

Do you have any doc or tutorial that explains the steps in detail?

olibre commented 2 years ago

Do you have any doc or tutorial that explains the steps in detail?

In your ~/.profile append the following:

# The following env. vars enable ibus-emoji using Ctrl + .
export GTK_IM_MODULE=ibus
export QT_IM_MODULE=ibus
export XMODIFIERS=@im=ibus

To install Intelligent Input Bus see: https://github.com/ibus/ibus/wiki/ReadMe

To configure Emoji settings:

  1. shortcut Alt + F2 then ibus-setup or in a terminal, run ibus-setup
  2. Go to tab Emoji
lhindir commented 2 years ago

Try with ibus

Awesome, thanks. I thought IBus was only for international input, but this emoji feature indeed works across almost all applications I’ve tried. Only Spotify and Steam don’t seem to work, and I never really need emoji input there anyway. It’s also independent of GNOME, so it should work when trying other desktop environments and window managers. This obsoletes this extension for me.

Edit: it does have some quirks, though. The optional emoji menu available on pressing space doesn’t work in Wayland apps, and the emoji input method doesn’t work at all in GTK 4 apps.

maoschanz commented 2 years ago

I really like this extension and I was a bit frustrated that it wasn't working on Gnome 40+. Tried the latest commit 3fe617c on Pop-OS 21.10 @ Gnome 40.4.0, it was unsuccessful. I forked and made some changes 929b2eb (also CSS, sorry, was strange on Pop-OS dark theme), works good enough to me. I do believe it need some more changes and code clean-up, so I will not submit a PR.

yeah i merged everything before going in vacation, and i made it work in the following weeks while riding the trains: not everything is committed nor pushed, the prefs work fine but not the extension itself