Fallback icon if weather is unknown

Double-width question mark to match double-width weather icons
This commit is contained in:
John Mertz 2023-07-20 16:12:31 -04:00
parent bbaec67a8c
commit 02a9dbef29
Signed by: jpm
GPG Key ID: E9C5EA2D867501AB
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ my $ref = $json->decode($ret->{_content});
if ($cmd eq 'bar') {
my $temp = $ref->{current}->{temp} - 273.15;
my $icon = $ref->{current}->{weather}->[0]->{icon};
my $icon = $ref->{current}->{weather}->[0]->{icon} //= '';
printf("<span font='Anonymice Nerd Font 18'>%s</span>%.1f%s", $icons{$icon}, ${temp}, "°C");
} elsif ($cmd eq 'notify') {