diff --git a/usr/lib/byobu/.notify_osd b/usr/lib/byobu/.notify_osd index 96adcc4f..081b1346 100755 --- a/usr/lib/byobu/.notify_osd +++ b/usr/lib/byobu/.notify_osd @@ -22,10 +22,10 @@ $/ = "\n\n"; while () { $msg = $_; - $msg =~ s/\[[^,]*, //; - $msg =~ s/ \] /: /; - $msg =~ s/\s+/ /g; - $msg =~ s/\s+$//g; - $msg =~ s/^\s+//g; + $msg =~ s/\[[^,]*, //; # strip the leading "[timestamp, " + $msg =~ s/ \] /: /; # replace the " ] " following the indicator name, with ":" + $msg =~ s/\s+/ /g; # collapse multi-whitespace into one + $msg =~ s/\s+$//g; # strip trailing whitespace + $msg =~ s/^\s+//g; # strip leading whitespace system("/usr/bin/screen", "-X", "at", "0", "echo", "[$msg]"); }