From 660d23267d5e6f34da72b2e8819b06be540165d6 Mon Sep 17 00:00:00 2001 From: TiredSounds Date: Mon, 1 Jun 2015 14:35:19 +0100 Subject: [PATCH] Create cmus-covergrabber A simple script to get the currently playing album from Cmus, and pass it to covergrabber.py. --- cmus-covergrabber | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 cmus-covergrabber diff --git a/cmus-covergrabber b/cmus-covergrabber new file mode 100644 index 0000000..051ba23 --- /dev/null +++ b/cmus-covergrabber @@ -0,0 +1,10 @@ +#!/bin/bash +## A simple script to get the currently playing album from Cmus, and pass it to covergrabber.py. +## Requires Cover Grabber: https://github.com/thedonvaughn/cover_grabber and of course Cmus music player. +## It is a good idea to alias this in your .bashrc. I aliased mine as 'cmus-grab'! + +# Gets the directory containing our music. +FOLDER=$( cmus-remote -Q | grep 'file ' | cut -c6- | sed 's:/[^/]*$::' ) + +# Passes to covergrabber. +covergrabber "$FOLDER"