Rhythmbox delete current song

Rhythmbox is a nifty and comfy music player for Linux. It’s set as default music player in Ubuntu and Fedora. Although Ubuntu a few years ago had switched to Banshee  in the next release they returned back to Rhythmbox to my great pleasure.

This music player can manage pretty large music collections. For example on my Lubuntu 14.04 it handles successfully over 120 GB of music.

It has many features but the most exiting one in my opinion is the ability to remove  the playing song with one press of key if it doesn’t go well with your musical taste.

Unfortunately that extension stopped to work for me when I updated to Ubuntu 11.10. Whatever I tried – nothing helped. Reverting back to previous distribution of OS wasn’t an option for me then. So  I decided to code it!

At that time I liked C++ so  that was a language of choice to solve the problem (this sounds a bit crazy for me now). But anyway.

How it works:

You press a predefined key and  the song which is currently being played gets moved to the trash. Easy. That’s all.

Installation:

At first you need install dependencies. To install them execute sudo apt-get install xbindkeys trash-cli for Ubuntu/Debian  and sudo yum install xbindkeys trash-cli if you have Fedora-like distribution.

There are two ways to install a program. The first one is the easiest.

  • First goes for you if you have Debain/Ubuntu like OS. You need download the archive, move to the folder and execute python install.py. Proceed with guide and you are done.
  • If you have another branch of Linux you will need to do a bit more manual configuration

Instruction for manual configuration.

The fastest way is to download binary file for 32-bit distributives for 64-bit distributives and launch it if it complains you don’t have either xbindkeys or trash-cli. So you need to have installed them both. 

You can compile project manually. To do it you need download the project either  from here  or do the following command in your terminal git clone https://bitbucket.org/gekannt/rhythmboxdel.git . After it you need launch in console make and you will get a ready binary to use if everything goes well otherwise see what kind of error you get.

 Pic 1 - Rhythmdel in action

Pic 1 – Rhythmdel in action

I’ve been successfully using it since 2013 and thought it would be good to share it. If you have any questions I’m eager to answer them.

Project is hosted at bitbucket as RhythmboxDel.



Comments
Kint
August 23, 2016 at 01:50

Hallo, thanks a lot for this. Just exactly what I need. Can you show me how can I can reassign another shortcut key? Dankeschön :)

    Alex Shulzhenko
    December 12, 2016 at 20:55

    Sure, this script is completely agnostic of the way how it gets called. I use xbindkeys tool (you may use any other you like). After installing it you need execute xbindkeys -d > ~/.xbindkeysrc and afterwards launch xbindkeys -k you will see a window prompting for your input . After it you can bind any combination to action. Check ~/.xbindkeysrc file and add up a new command. Kein Ding ^_^


Leave a Reply

Your email address will not be published. Required fields are marked *