aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbar.sh4
-rwxr-xr-xmodules/mpd5
2 files changed, 6 insertions, 3 deletions
diff --git a/bar.sh b/bar.sh
index 86d12f0..1a98bf1 100755
--- a/bar.sh
+++ b/bar.sh
@@ -46,7 +46,9 @@ run_module()
out="$($DEFAULT_MODULES_DIR$1)"
fi
- if [[ ! "$out" = "" ]]; then
+ if [[ "$out" = " " ]]; then
+ echo " " > "$OUTPUT_CACHE$module"
+ elif [[ ! "$out" = "" ]]; then
out="$out$SEPARATOR."
echo "$out" > "$OUTPUT_CACHE$module"
fi
diff --git a/modules/mpd b/modules/mpd
index 67c319f..ecbdd4e 100755
--- a/modules/mpd
+++ b/modules/mpd
@@ -1,13 +1,14 @@
#!/bin/bash
-PREFIX_PLAY=' '
-PREFIX_PAUSE=' '
+PREFIX_PLAY=' '
+PREFIX_PAUSE=' '
get_mpd()
{
current_song="$(mpc current)"
if [[ "$current_song" = "" ]]; then
+ echo " "
exit 0
else
playpause=$(mpc | awk '/\[.*]/{split($0, a, " "); print a[1]}')