From e5cf9723cd9f002de3e960f79a56d05304f730f9 Mon Sep 17 00:00:00 2001 From: shmibs Date: Thu, 23 Oct 2014 18:32:20 -0700 Subject: banshee => mpd+pms --- .config/herbstluftwm/panel.sh | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) (limited to '.config/herbstluftwm/panel.sh') diff --git a/.config/herbstluftwm/panel.sh b/.config/herbstluftwm/panel.sh index 8852924..3d264a0 100755 --- a/.config/herbstluftwm/panel.sh +++ b/.config/herbstluftwm/panel.sh @@ -112,7 +112,7 @@ fields[2]=$(update_winlist) fields[3]="%{r}" # when fields[4]="" -# banshee np +# mpd fields[5]="" # conky stats fields[6]="" @@ -130,12 +130,6 @@ fields[7]="" # with the first element in the line as a # unique identifier for the event type -get_stat() { - { - conky -c ~/.config/herbstluftwm/panel/conky_stats - } -} - get_date() { { while true; do @@ -145,6 +139,12 @@ get_date() { } | awk '$0 != l { print ; l=$0 ; fflush(); }' } +get_stat() { + { + conky -c ~/.config/herbstluftwm/panel/conky_stats + } +} + get_when() { { while true; do @@ -158,6 +158,12 @@ get_when() { } | awk '$0 != l { print ; l=$0 ; fflush(); }' } +get_mpd() { + while true; do + mpc current -f "mpd\t%artist%\t%album%\t%title%" --wait + done +} + ####################### @@ -174,6 +180,8 @@ get_when() { child[2]=$! get_when & child[3]=$! + #get_mpd & + #child[4]=$! hc --idle @@ -282,6 +290,15 @@ get_when() { date) notify-send "$(cal)" ;; + #mpd) + # artist=$(mpc current -f '%artist%') + # albumartist=$(mpc current -f '%albumartist%') + # if [[ "$artist" != "$albumartist" ]]; then + # artist=$(echo -e "album artist: $albumartist\nartist: $artist") + # else + # artist=$(echo "artist: $artist") + # fi + # file="/home/shmibs/music/$(mpc current -f '%file%')" stats) urxvt -e htop & ;; -- cgit v1.2.3