+sub status {
+ my $text = shift;
+ $text =~ s{\s+$}{};
+ my $new = $0;
+ $new =~ s{^[\w\/]+/(\w+) }{$1 }; # strip path from process name
+ if ( $text =~ m/^\|/ ) {
+ $new =~ s/\|.*/$text/ or $new .= " $text";
+ } else {
+ $new =~ s/\s+.*/ $text/ or $new .= " $text";
+ }
+ $0 = $new;
+}
+