X-Git-Url: http://git.shiar.nl/barcat.git/blobdiff_plain/e71fe5ab1a908a940a83a38e81e390c7bb5c61c1..e5a35b808a2e0f6d7107a3f79067524de89b6be1:/barcat diff --git a/barcat b/barcat index 2339bc7..b939ea9 100755 --- a/barcat +++ b/barcat @@ -57,6 +57,7 @@ GetOptions(\%opt, 'indicators:s', 'palette=s' => sub { $opt{palette} = { + '' => [], fire => [qw( 90 31 91 33 93 97 96 )], fire256=> [map {"38;5;$_"} qw( 235 52 88 124 160 196 @@ -75,7 +76,11 @@ GetOptions(\%opt, (map { 201 - $_ } 0..4), # -b 196, ], - }->{$_[1]} // [ split /[^0-9;]/, $_[1] ]; + }->{$_[1]} // do { + my @vals = split /[^0-9;]/, $_[1] + or die "Empty palette resulting from \"$_[1]\"\n"; + \@vals; + }; }, 'stat|s!', 'signal-stat=s',