Compare commits
3 Commits
22e3692d22
...
be285ea48a
Author | SHA1 | Date |
---|---|---|
John Mertz | be285ea48a | |
John Mertz | 6d2e0b8a3d | |
John Mertz | 0fab30cc8e |
|
@ -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
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue