Andrew's git
/
scripts.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
i3blocks-music.pl: remove line breaks and punctation-delimited postambles
author
Andrew Lorimer
<andrew@lorimer.id.au>
Tue, 4 Jun 2019 07:31:28 +0000
(17:31 +1000)
committer
Andrew Lorimer
<andrew@lorimer.id.au>
Tue, 4 Jun 2019 07:31:28 +0000
(17:31 +1000)
i3blocks-music.pl
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (from parent 1:
ac9f601
)
diff --git
a/i3blocks-music.pl
b/i3blocks-music.pl
index cd32d15adaccdd4eeb3759c53189be7e86a2c622..62e3a16ec0d46333dba4a1eeb822a96e15e53607 100755
(executable)
--- 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.*)//;
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;
$title =~ s/&/&/;
push(@metadata, $title) if $title;
+for (@metadata){
+ s/\n//;
+}
+
# Print stuff
print(join(" - ", @metadata)) if @metadata;
print("</span>");
# Print stuff
print(join(" - ", @metadata)) if @metadata;
print("</span>");