Fallback icon if weather is unknown
Double-width question mark to match double-width weather icons
This commit is contained in:
parent
bbaec67a8c
commit
02a9dbef29
|
@ -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') {
|
||||
|
|
Loading…
Reference in New Issue