bjesus / wttrbar

Custom module for showing the weather in Waybar, using the great wttr.in
MIT License
140 stars 24 forks source link

Sunrise/Sunset icons not working #2

Closed etrigan63 closed 1 year ago

etrigan63 commented 1 year ago

I am running wttrbar on waybar in hyprland. The sunrise/sunset icons are not showing correctly on the tooltip despite having a nerd font and weather icons installed. I can't get a screenshot but here is the command line output:

wttrbar --fahrenheit --main-indicator temp_F
{"text":"🌧️ 69","tooltip":"<b>Light rain</b> 69°\nFeels like: 69°\nWind: 9Km/h\nHumidity: 90%\n\n<b>Today, 2023-04-17</b>\n⬆️ 86° ⬇️ 78° 🌅 06:56 AM 🌇 07:45 PM\n03 🌦️  83° Patchy rain possible, Overcast 86%, Rain 79%\n06 🌤️  82° Partly cloudy, Sunshine 85%, Overcast 41%\n09 🌩️  83° Thundery outbreaks possible, Overcast 89%, Sunshine 16%\n12 🌧️  89° Light rain shower, Overcast 94%, Rain 79%\n15 🌧️  87° Light rain shower, Overcast 93%, Rain 75%\n18 🌦️  84° Patchy rain possible, Overcast 84%, Rain 69%\n21 🌦️  81° Patchy rain possible, Overcast 93%, Rain 67%\n\n<b>Tomorrow, 2023-04-18</b>\n⬆️ 84° ⬇️ 74° 🌅 06:55 AM 🌇 07:46 PM\n00 🌦️  79° Patchy rain possible, Overcast 93%, Rain 69%\n03 ☀️  79° Clear, Sunshine 87%\n06 ☀️  78° Clear, Sunshine 89%\n09 ☀️  77° Sunny, Sunshine 90%\n12 ☀️  84° Sunny, Sunshine 92%\n15 ☀️  85° Sunny, Sunshine 86%\n18 ☀️  81° Sunny, Sunshine 87%\n21 ☀️  78° Clear, Sunshine 89%\n\n<b>2023-04-19</b>\n⬆️ 84° ⬇️ 74° 🌅 06:54 AM 🌇 07:46 PM\n00 ☀️  77° Clear, Sunshine 93%\n03 ☀️  77° Clear, Sunshine 90%\n06 ☀️  77° Clear, Sunshine 87%\n09 ☀️  78° Sunny, Sunshine 94%\n12 ☀️  84° Sunny, Sunshine 89%\n15 ☀️  85° Sunny, Sunshine 94%\n18 ☀️  82° Sunny, Sunshine 87%\n21 ☀️  78° Clear, Sunshine 93%\n"}

Oddly enough, the output works here. Obviously a font issue but I am not sure how to configure this in waybar.

bjesus commented 1 year ago

hello! I'm sorry but this indeed is just a font issue that wttrbar has nothing to do with... I don't know what OS you're on but I'm on Arch and I have these fonts installed:

adobe-source-code-pro-fonts
cantarell-fonts
fonts-droid-fallback
fonts-noto-hinted
gsfonts
noto-fonts-emoji
xorg-fonts-encodings
ttf-droid
ttf-iosevka-nerd
ttf-jetbrains-mono-nerd
ttf-liberation
ttf-ms-win10-auto

pretty sure noto-fonts-emoji is the important one. I suggest you consult your distro / waybar docs to solve this because all wttrbar does is to prepare the right JSON structure for Waybar to display.

etrigan63 commented 1 year ago

Perfect. I will give that a shot.

etrigan63 commented 1 year ago

For the record, you only have to install the font noto-fonts-emoji for the tooltip to render correctly. Waybar CSS does not require modification. You could add it as a dependency in the AUR BUILD.