scripts/varios/get_song.sh

21 lines
391 B
Bash
Raw Normal View History

#!/bin/sh
# Script que muestra información sobre la canción en curso
#
# Dependencias: moc
#
# Shell: POSIX compliant
# Autor: O. Sánchez <o-sanchez@linuxmail.org>
if [ "$(mocp -Q %state)" != "STOP" ];then
SONG=$(mocp -Q %song)
if [ -n "$SONG" ]; then
echo "$SONG - $(mocp -Q %album)"
else
# basename " $(mocp -Q %file)"
echo "$(mocp -Q %file)"
fi
else
echo ""
fi