This commit is contained in:
2021-02-28 00:43:32 +01:00
parent 9dc7f70596
commit 3991184cda
7 changed files with 57 additions and 18 deletions

View File

@@ -1,11 +1,11 @@
#!/bin/sh
player_status=$(playerctl status 2> /dev/null)
player_status=$(playerctl --player=spotify status 2> /dev/null)
if [ "$player_status" = "Playing" ]; then
echo "$(playerctl metadata artist) - $(playerctl metadata title) %{A1:playerctl previous:}玲%{A} %{A1:playerctl play-pause:} %{A} %{A1:playerctl next:}怜%{A}"
echo "$(playerctl --player=spotify metadata artist) - $(playerctl --player=spotify metadata title) %{A1:playerctl --player=spotify previous:}玲%{A} %{A1:playerctl --player=spotify play-pause:} %{A} %{A1:playerctl --player=spotify next:}怜%{A}"
elif [ "$player_status" = "Paused" ]; then
echo "$(playerctl metadata artist) - $(playerctl metadata title) %{A1:playerctl previous:}玲%{A} %{A1:playerctl play-pause:} 契%{A} %{A1:playerctl next:}怜%{A}"
echo "$(playerctl --player=spotify metadata artist) - $(playerctl --player=spotify metadata title) %{A1:playerctl --player=spotify previous:}玲%{A} %{A1:playerctl --player=spotify play-pause:} 契%{A} %{A1:playerctl --player=spotify next:}怜%{A}"
else
echo ""
fi