Cleanup configs

This commit is contained in:
Tobias Reisinger 2023-03-09 12:57:37 +01:00
parent e7ae131ef1
commit 88aff77c72
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
7 changed files with 13 additions and 25 deletions

View file

@ -1,13 +1,6 @@
#!/usr/bin/env sh
playerctl="playerctl -p spotifyd"
player_status=$($playerctl status 2> /dev/null)
if [ "$player_status" = "Playing" ]; then
echo "$($playerctl metadata -f '{{title}} - {{artist}} | {{duration(position)}}/{{duration(mpris:length)}}')"
elif [ "$player_status" = "Paused" ]; then
echo "$($playerctl metadata -f '{{title}} - {{artist}} | {{duration(position)}}/{{duration(mpris:length)}}')"
else
echo ""
fi
playerctl -p spotifyd metadata -f '{{ uc(status) }} {{title}} - {{artist}} | {{duration(position)}}/{{duration(mpris:length)}}' 2>/dev/null \
| sed -e 's/PLAYING//' \
-e 's/PAUSED//' \
-e 's/STOPPED//'