bin bash track mocp -Q title cut -d -f s_dir mocp -i egrep File cut -d

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#!/bin/bash
track = `mocp -Q %title | cut -d " " -f 1`
s_dir = `mocp -i | egrep File | cut -d : -f2 | cut -d / -f 1,2,3,4,5,6`
if [ $(echo $track | wc -L) -lt 2 ] && [ "$(echo $track | grep [0-9])" = "$track" ] ; then track="0$track" ; fi
if [ -n $s_dir]
then
ico = "$s_dir/folder.jpg"
else
ico = "/usr/share/icons/Humanity/emblems/48/emblem-sound.svg"
fi
notify-send -i "$ico" \
"$track - $(mocp -Q ' %song')" "$(mocp -Q '%artist - %album') $(mocp -Q '(%tt)')"