From 599b42240513bc72fe774ac75b720853c056ef41 Mon Sep 17 00:00:00 2001 From: Andrew Lorimer Date: Tue, 4 Jun 2019 17:31:28 +1000 Subject: [PATCH] i3blocks-music.pl: remove line breaks and punctation-delimited postambles --- i3blocks-music.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/i3blocks-music.pl b/i3blocks-music.pl index cd32d15..62e3a16 100755 --- a/i3blocks-music.pl +++ b/i3blocks-music.pl @@ -28,9 +28,14 @@ push(@metadata, $artist) if $artist; my $title = qx(playerctl $player_arg metadata title); $title =~ s/(\s|\s\()[Ff]([et]at[. ].*|t.*)//; +$title =~ s/(\s\(.+\) *|\s-\s.+)//; $title =~ s/&/&/; push(@metadata, $title) if $title; +for (@metadata){ + s/\n//; +} + # Print stuff print(join(" - ", @metadata)) if @metadata; print(""); -- 2.43.2