brndnmtthws / conky

Light-weight system monitor for X, Wayland (sort of), and other things, too
https://conky.cc
GNU General Public License v3.0
7.11k stars 613 forks source link

[Feature] Xft emoji support #898

Open Microcrap opened 4 years ago

Microcrap commented 4 years ago

Please, consider to add more emoji support in conky.

If you want make a simple thing : displaying the country image before the user WAN ip adress, actually you can't. In some case, emoji can replace text for a better grasp.

Thanks.

flipflop133 commented 4 years ago

Does someone know a workaround to for example have wttr weather emojis like sun, clouds or the only way is to wait for proper support?

lasers commented 4 years ago

You could try serving the image from curl wttr.in/???.png.

flipflop133 commented 4 years ago

I got it working with these lines: ${texeci 5 curl wttr.in/arlon_lang=en.png | convert - -transparent black $HOME/.config/conky/out.png} ${image $HOME/.config/conky/out.png -p 0,0} But the issue now, is that the image doesn't reload itself until I restart the session or conky, I checked the conky variables but there's no option to reload an image, is there a workaround to this?

lasers commented 4 years ago

Maybe set up a hourly cron or something like that to reload conky as a workaround.

An easy way to force Conky to reload your ~/.config/conky/conky.conf: "killall -SIGUSR1 conky". Saves you the trouble of having to kill and then restart. You can now also do the same with SIGHUP.

flipflop133 commented 4 years ago

I created this bash script that kill conky(as stated in conky man) then runs all my conky configs, but it's doing it only one time. Then conky keeps running. (the first script is triggered by a .desktop file as described in arch wiki for conky.)

FIRST SCRIPT

!/bin/bash

while true; do { killall -SIGUSR1 conky source $HOME/scripts/conky_configs.sh } sleep 10; done

SECOND SCRIPT

!/bin/bash

conky -c ~/.config/conky/conky1.conf & conky -c ~/.config/conky/conky2.conf & conky -c ~/.config/conky/conky3.conf & conky -c ~/.config/conky/conky4.conf & conky -c ~/.config/conky/conky5.conf & exit

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment, or this issue will be closed in 30 days.

bi4k8 commented 1 year ago

Under Wayland, where we use Pango instead of Xft for text rendering, emoji are fully supported.

Caellian commented 4 months ago

Lemonbar didn't have emoji support with xft, then someone made a fork and this commit introduced support for emojis.

The commit in question basically upgrades character storage from u16 to u32 and uses FcUtf8ToUcs4 to compute ucs2 codes from utf8 text.

Lemonbar is a good example because it's got a small codebase that basically covers this issue.