change music info source
This commit is contained in:
parent
826468d54d
commit
d33b9b4670
5 changed files with 16 additions and 4 deletions
|
@ -1,2 +1,14 @@
|
|||
#!/bin/sh
|
||||
head ~/.wnpClient/wnpClient.txt -n 2 | sed ':a;N;$!ba;s/\n/ by /g'
|
||||
|
||||
status=$(playerctl status -a)
|
||||
title=$(playerctl metadata title)
|
||||
artist=$(playerctl metadata artist)
|
||||
if [[ $status =~ Playing ]]; then
|
||||
length=${#title}
|
||||
if [ $length -gt 35 ]; then
|
||||
echo "$title"
|
||||
else
|
||||
echo "$title by $artist"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue