Andrew's git
/
scripts.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
fix parenthesis detection in i3blocks-music
author
Andrew Lorimer
<andrew@lorimer.id.au>
Thu, 6 Jun 2019 05:31:33 +0000
(15:31 +1000)
committer
Andrew Lorimer
<andrew@lorimer.id.au>
Thu, 6 Jun 2019 05:31:33 +0000
(15:31 +1000)
i3blocks-music.pl
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
599b422
)
diff --git
a/i3blocks-music.pl
b/i3blocks-music.pl
index 62e3a16ec0d46333dba4a1eeb822a96e15e53607..2cebc3821f1bd8833030b67059e91afd75fd206c 100755
(executable)
--- a/
i3blocks-music.pl
+++ b/
i3blocks-music.pl
@@
-28,12
+28,12
@@
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/&/&/;
+$title =~ s/(
(\s(\(|\[).+(\)|\]).+)|(\s-\s.+))+
//;
+$title =~ s/&/&/;
# fix ampersand rendering for i3bar
push(@metadata, $title) if $title;
for (@metadata){
- s/\n//;
+ s/\n//;
# remove newlines
}
# Print stuff