diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-03-19 21:00:47 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-03-19 21:01:08 -0400 |
commit | b6d293ea605190d5547965343bc50b15565c51f3 (patch) | |
tree | 896c2f249e251b029b6a7dde723875fde2854a4f /bin | |
parent | 3fd98c365894218b0fb48b494b1835d299e43edb (diff) | |
download | conf-b6d293ea605190d5547965343bc50b15565c51f3.tar.gz conf-b6d293ea605190d5547965343bc50b15565c51f3.zip |
fix undef warning
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/status | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -51,6 +51,7 @@ while (<$i3status>) { my ($state, $val) = $item->{full_text} =~ /(\w+) (\d+(?:\.\d+))%/; ($discharge_rate{$item->{instance}}) = $item->{full_text} =~ /\(.* (.*)W\)/; $discharge_rate{$item->{instance}} *= -1 if defined($discharge_rate{$item->{instance}}) && $state ne 'BAT'; + $discharge_rate{$item->{instance}} //= 0; $battery_index{$item->{instance}} = $index; $item->{full_text} =~ s/\((.*) (.*)W\)/\($1\)/; $item->{color} = |