I'm trying to extract the directory of the current playing song in Quodlibet for use in attempting to display album artwork in conky.
In QL's current file ~/.quodlibet/current
there is a line that gives you the full path of the currently playing song, but I only need the directory. Is there a way I can ignore the last part of the path with grep?
For example if I had a file called /music/album/03-song.ogg
, I'd only want grep to output everything before the 0
(or 1/2/3/4
for longer albums).
I've no idea if I can use this for what I need it for, but it would still be useful to know for future reference.