amarok and irssi
First posted 2007-05-22 00:00:00.000001+00:00
There are lots of scripts that allow irssi to display the track currently playing in amarok. However an ultra-simple solution without any scripts is just:
/alias np /exec -out echo np: `dcop amarok player nowPlaying`
Which will create a /np command to show your current track.
dencrypt suggested a possible extension for anyone who has irssi running on a server and amarok running on your client. As long as your desktop is running sshd and has a publicly accessible IP address you can use the following recipe. I have made a few changes to dencrypt's recipe to make it more secure.
On the server create an ssh keypair. Leave the password blank. (run this on your server)
ssh-keygen -f ~/.ssh/amarok_keyCopy the keyfile locally (run this on your client)
scp YOUR_SERVER_HOSTNAME_HERE:.ssh/amarok_key.pub ~/.ssh/amarok_key.pubConfigure ssh to allow this key to run the now playing command (do this on your client)
Open ~/.ssh/authorized_keys in your text editor and add the following to a new line at the bottom
command="dcop --user `whoami` amarok player nowPlaying",no-pty,no-port-forwarding,no-agent-forwarding,no-X11-forwardingAfter this (but on the same line) add the contents of the file we just copied across (~/.ssh/amarok_key.pub)
Tell irssi to use this command (do this in irssi)
/exec -out echo np: `ssh -i ~/.ssh/amarok_key YOUR_DESKTOP_IP_HERE `