Update mpd and volume output in status bar.

This commit is contained in:
2014-04-26 16:48:40 +02:00
parent 88303cf1cd
commit 279e1ae399
2 changed files with 12 additions and 7 deletions

View File

@@ -17,15 +17,22 @@ update_interval_on_battery 1.0
TEXT TEXT
[\ [\
{ "full_text" : "\
${if_running mpd}\
${if_mpd_playing}\ ${if_mpd_playing}\
{ "full_text" : "\
${if_match "${mpd_status}" == "Paused"}\ ${if_match "${mpd_status}" == "Paused"}\
\ \
${else}\ ${else}\
\ \
${endif}\ ${endif}\
${mpd_artist} - ${mpd_title} ${mpd_elapsed}/${mpd_length}\ - " , "name" : "mpd_toggle" ,"separator" : false , "separator_block_width" : 0 },\
${endif}\
\
\
\
{ "full_text" : "\
${if_running mpd}\
${if_mpd_playing}\
${mpd_artist} - ${mpd_title} ${mpd_elapsed}/${mpd_length}\
${else}\ ${else}\
 stopped\  stopped\
${endif}\ ${endif}\
@@ -128,7 +135,7 @@ ${endif}\
\ \
\ \
{ "full_text" : "  \ { "full_text" : "  \
${texeci 3600 bash $HOME/.i3/scripts/pa-volume.bash status} " , "color" : "\#FFFFFF" , "name" : "volume" },\ ${texeci 5 bash $HOME/.i3/scripts/pa-volume.bash status} " , "color" : "\#FFFFFF" , "name" : "volume" },\
\ \
\ \
\ \

View File

@@ -25,7 +25,6 @@ YAD_PREFIX="GTK2_RC_FILES=$GTK_THEME"
FONT="DejaVu Sans Mono 11" FONT="DejaVu Sans Mono 11"
mkdir -p "$(dirname $LOGFILE)"
echo > "$LOGFILE" echo > "$LOGFILE"
log() { log() {
@@ -83,7 +82,7 @@ while read line ; do
case "$name" in case "$name" in
"mpd") "mpd_toggle")
mpc toggle 1>/dev/null 2>%1 mpc toggle 1>/dev/null 2>%1
;; ;;
"pacman") "pacman")
@@ -200,7 +199,6 @@ while read line ; do
elif [[ $button == 0 ]] ; then elif [[ $button == 0 ]] ; then
bash $PA_VOLUME_SCRIPT set-vol $newvol bash $PA_VOLUME_SCRIPT set-vol $newvol
fi fi
update
;; ;;
esac esac