From: Andrew Lorimer Date: Thu, 6 Jun 2019 07:20:33 +0000 (+1000) Subject: also replace ampersands in artist X-Git-Url: https://git.lorimer.id.au/scripts.git/diff_plain/f8ff7e8710bdf169ced6073ae8e0bf48cb2c028e?ds=inline;hp=-c also replace ampersands in artist --- f8ff7e8710bdf169ced6073ae8e0bf48cb2c028e diff --git a/i3blocks-music.pl b/i3blocks-music.pl index 2cebc38..4f71e2b 100755 --- a/i3blocks-music.pl +++ b/i3blocks-music.pl @@ -29,11 +29,11 @@ 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/&/&/; # fix ampersand rendering for i3bar push(@metadata, $title) if $title; for (@metadata){ s/\n//; # remove newlines + s/&/&/; # fix ampersand rendering for i3bar } # Print stuff