Andrew's git
/
scripts.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
improve title shortening regex
author
Andrew Lorimer
<andrew@lorimer.id.au>
Thu, 28 Jun 2018 07:51:39 +0000
(17:51 +1000)
committer
Andrew Lorimer
<andrew@lorimer.id.au>
Thu, 28 Jun 2018 07:51:39 +0000
(17:51 +1000)
i3blocks-music.pl
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
aa33e2e
)
diff --git
a/i3blocks-music.pl
b/i3blocks-music.pl
index 9bee37a5e2ae3deb956e30041f705dd8cc16f900..4d6ab2734744e8e9261967a8af70783adddb78c1 100755
(executable)
--- a/
i3blocks-music.pl
+++ b/
i3blocks-music.pl
@@
-27,7
+27,7
@@
my $artist = qx(playerctl $player_arg metadata artist);
push(@metadata, $artist) if $artist;
my $title = qx(playerctl $player_arg metadata title);
-$title =~ s/(
?:[ ][( ][Ff]eat[. ].*)|(?:[( ][Ff]t[. ].*)
//;
+$title =~ s/(
\s|\s\()[Ff]([et]at[. ].*|t.*
//;
push(@metadata, $title) if $title;
# Print stuff