}
# Check playback status and set appropriate colour
-$_ = qx(playerctl status);
+$_ = qx(playerctl $player_arg status);
if (not m/Playing/) {
- print("<span color='#586e75'>");
+ print("<span color='#586e75'>♪ ");
}
else {
- print("<span>");
+ print("<span>♪ ");
}
# Obtain & format metadata from playerctl
my $title = qx(playerctl $player_arg metadata title);
$title =~ s/(\s|\s\()[Ff]([et]at[. ].*|t.*)//;
-$title =~ s/((\s(\(|\[).+(\)|\]).+)|(\s-\s.+))+//;
+$title =~ s/((\s(\(|\[).+(\)|\]).*)|(\s-\s.+))//;
push(@metadata, $title) if $title;
for (@metadata){