diff --git a/i3-wsbar b/i3-wsbar index 4e272316..2d546a73 100755 --- a/i3-wsbar +++ b/i3-wsbar @@ -223,7 +223,12 @@ $stdin = AnyEvent->io( fh => \*STDIN, poll => 'r', cb => sub { - chomp (my $line = ); + my $line = ; + if (!defined($line)) { + undef $stdin; + return; + } + chomp($line); $last_line = $line; update_output(); });