Compare commits

..

No commits in common. "be285ea48a69196b136bf17b1622aa19564de6fe" and "22e3692d2286c574066b364dd271ef69af80f751" have entirely different histories.

2 changed files with 10 additions and 10 deletions

9
waybar/waybar-nm.sh Executable file
View File

@ -0,0 +1,9 @@
#!/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,16 +11,7 @@ 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();
@ -39,7 +30,7 @@ if ($cmd eq 'bar') {
my $temp = $ref->{current}->{temp} - 273.15;
my $icon = $ref->{current}->{weather}->[0]->{icon};
printf("<span font='Anonymous Pro 18'>%s</span>%.1f%s", $icons{$icon}, ${temp}, "°C");
printf("%s%.1f%s", $icons{$icon}, ${temp}, "°C");
} elsif ($cmd eq 'notify') {
`notify-send weather TODO`;
} else {