mirror of
https://git.adityakumar.xyz/dwmbar.git
synced 2024-12-23 05:22:53 +00:00
Fixed mpd module to disappear when not active
This commit is contained in:
parent
ae163acf66
commit
d5a6b65c28
2 changed files with 6 additions and 3 deletions
4
bar.sh
4
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
|
||||
|
|
|
@ -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]}')
|
||||
|
|
Loading…
Reference in a new issue