Compare commits

...

3 Commits

2 changed files with 10 additions and 10 deletions

View File

@ -1,9 +0,0 @@
#!/bin/bash
RUNNING=$(pgrep nmtui)
if [ "$RUNNING" ]; then
kill $RUNNING 2&>1 /dev/null
else
/usr/bin/uxterm -e '/usr/bin/nmtui'
fi

View File

@ -11,7 +11,16 @@ if (defined($ARGV[0])) {
my $url = "https://john.me.tz/weather/weather.json";
my %icons = (
'01d' => "☀",
'01n' => "☾",
'02d' => "☁",
'02n' => "☁",
'03d' => "☁",
'03n' => "☁",
'04d' => "☁",
'04n' => "☁",
'10d' => "🌧",
'10n' => "🌧",
);
use LWP::UserAgent;
my $ua = LWP::UserAgent->new();
@ -30,7 +39,7 @@ if ($cmd eq 'bar') {
my $temp = $ref->{current}->{temp} - 273.15;
my $icon = $ref->{current}->{weather}->[0]->{icon};
printf("%s%.1f%s", $icons{$icon}, ${temp}, "°C");
printf("<span font='Anonymous Pro 18'>%s</span>%.1f%s", $icons{$icon}, ${temp}, "°C");
} elsif ($cmd eq 'notify') {
`notify-send weather TODO`;
} else {