From 279e1ae399a5f9a61401a2b030485cc073e09c4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Sat, 26 Apr 2014 16:48:40 +0200 Subject: [PATCH] Update mpd and volume output in status bar. --- i3/i3/conky/virtualarch.conkyrc | 15 +++++++++++---- i3/i3/i3bar_wrapper.bash | 4 +--- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/i3/i3/conky/virtualarch.conkyrc b/i3/i3/conky/virtualarch.conkyrc index b31a0e5..7bdb29b 100644 --- a/i3/i3/conky/virtualarch.conkyrc +++ b/i3/i3/conky/virtualarch.conkyrc @@ -17,15 +17,22 @@ update_interval_on_battery 1.0 TEXT [\ -{ "full_text" : "\ -${if_running mpd}\ ${if_mpd_playing}\ +{ "full_text" : "\ ${if_match "${mpd_status}" == "Paused"}\ \ ${else}\ \ ${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}\  stopped\ ${endif}\ @@ -128,7 +135,7 @@ ${endif}\ \ \ { "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" },\ \ \ \ diff --git a/i3/i3/i3bar_wrapper.bash b/i3/i3/i3bar_wrapper.bash index d0e45e6..62656d7 100644 --- a/i3/i3/i3bar_wrapper.bash +++ b/i3/i3/i3bar_wrapper.bash @@ -25,7 +25,6 @@ YAD_PREFIX="GTK2_RC_FILES=$GTK_THEME" FONT="DejaVu Sans Mono 11" -mkdir -p "$(dirname $LOGFILE)" echo > "$LOGFILE" log() { @@ -83,7 +82,7 @@ while read line ; do case "$name" in - "mpd") + "mpd_toggle") mpc toggle 1>/dev/null 2>%1 ;; "pacman") @@ -200,7 +199,6 @@ while read line ; do elif [[ $button == 0 ]] ; then bash $PA_VOLUME_SCRIPT set-vol $newvol fi - update ;; esac