Improve output for bar
This commit is contained in:
parent
274d9cc75b
commit
7876519667
|
@ -96,9 +96,8 @@ if ($bar) {
|
|||
use JSON::XS;
|
||||
my $json = JSON::XS->new();
|
||||
my $powref = $json->decode($output);
|
||||
my $icon;
|
||||
my $class = 'discharging';
|
||||
$output = '{"text": "' . $powref->{Total}->{Percentage} . '% ';
|
||||
$output = '{"text": "';
|
||||
if ($powref->{AC}->{Status} eq "Plugged-In") {
|
||||
$class = 'charging';
|
||||
$output .= "";
|
||||
|
@ -115,7 +114,7 @@ if ($bar) {
|
|||
} else {
|
||||
$output .= "";
|
||||
}
|
||||
$output .= '", "tooltip": "' . $class . '", "class": "' . $class . '"}';
|
||||
$output .= $powref->{Total}->{Percentage} . '%", "tooltip": "' . $class . '", "class": "' . $class . '"}';
|
||||
} elsif ($pretty) {
|
||||
use JSON::XS;
|
||||
my $json = JSON::XS->new();
|
||||
|
|
Loading…
Reference in New Issue