aboutsummaryrefslogtreecommitdiff
path: root/modules/mpd
diff options
context:
space:
mode:
Diffstat (limited to 'modules/mpd')
-rwxr-xr-xmodules/mpd8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/mpd b/modules/mpd
index 5db0d64..67c319f 100755
--- a/modules/mpd
+++ b/modules/mpd
@@ -5,20 +5,20 @@ PREFIX_PAUSE=' '
get_mpd()
{
- current_song=$(mpc current)
+ current_song="$(mpc current)"
if [[ "$current_song" = "" ]]; then
exit 0
else
playpause=$(mpc | awk '/\[.*]/{split($0, a, " "); print a[1]}')
if [[ "$playpause" = "[playing]" ]]; then
- current_song=$PREFIX_PLAY$current_song
+ current_song="$PREFIX_PLAY $current_song"
elif [[ "$playpause" = "[paused]" ]]; then
- current_song=$PREFIX_PAUSE$current_song
+ current_song="$PREFIX_PAUSE $current_song"
fi
fi
- echo $current_song
+ echo "$current_song"
}
get_mpd