aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorArchie Hilton (thytom) <archie.hilton1@gmail.com>2019-10-25 13:11:58 +0100
committerArchie Hilton (thytom) <archie.hilton1@gmail.com>2019-10-25 13:11:58 +0100
commit5666ca42d78f5e0035fd334f52959e29f0911b6c (patch)
tree715439de399c5f67c5526515170860364ff0d4bf /modules
parent2b024b483fc754092829a60e16bfc34913d48ea6 (diff)
Fix whitespace issues with mpd module.
Diffstat (limited to 'modules')
-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