Geektool Display Terminal Title?

Discussion in 'UI Customization' started by chancellorr, Oct 26, 2013.

  1. chancellorr macrumors newbie

    Joined:
    Oct 26, 2013
    #1
    Is there anyway to do this? I'm trying to find a way to display my CMUS now playing info and I feel like this would be the easiest way if its even possible. Someone please help. :]
     
  2. hyw1993 macrumors newbie

    Joined:
    Mar 10, 2014
    Location:
    Seattle
    #2
    Try this (change CMUSREMOTEPATH if it is not there):

    #!/bin/bash

    CMUSREMOTEPATH='/usr/local/bin/cmus-remote' # path of cmus-remote

    status=`$CMUSREMOTEPATH -Q 2> /dev/null`

    if [ $? -eq 1 ] || ! echo "$status" | grep 'status playing' > /dev/null; then
    exit
    fi

    echo -n 'Now Playing: '
    echo -n `echo "$status" | egrep 'tag title (.*)' | sed -E 's/tag title (.*)/\1/g'`
    echo -n ' - '
    echo -n `echo "$status" | egrep 'tag artist (.*)' | sed -E 's/tag artist (.*)/\1/g'`
     

Share This Page