To work with rhythmbox from terminal there is really nice tool called rhythmbox-client which allows controlling already running instance of Rhythmbox. To see all supported features simply run rhythmbox-client -help.
Widget shows name and artist of currently playing song. Basically it runs theis command: rhythmbox-client --no-start --print-playing. Looks like this: .
To create such widget create file rhythmbox.lua with following content:
In rc.lua add vicious and rhythmbox files, create widget and add it to wibox:
For the shortcuts most useful would be to play next/previous song and play/pause action. I would like to use Mod4+,(.) to switch songs and Mod4+/ to play/pause.
You can try these commands from terminal to perform those actions: