Mihai Olteanu


A mouseless last.fm music player with lyrics

This project is hosted on github.

Why is last.fm useful

Multiple reasons.

  • Huge music database generated by user preferences
  • Complete info about all the artists known to mankind, including artist bio, top songs, genres, albums and most importantly for our cause, youtube links to songs.
  • A browser interface that can be used to play any song you like, or similar songs based on a given artist or genre.
  • In short: a great way to discover music, free to use and no local music player and mp3 files needed.

What is missing from last.fm

Mouseless geeks already know what it’s missing from this picture.

  • A way to interact with last.fm by keyboard only. No mouse, no opening up the browser to change songs or playlists.
  • A way to search songs that you already know and like by lyrics directly from this new player and not, again, by opening up the browser. Searching songs on google by lyrics is hard, anyway, if you have some lesser known artists.

How it works

If the player is already running, Fn-F5 (play) will toggle the play/pause status of the player. Otherwise you can select what to play:

playing song

I’ve selected to play a single artist in this case. Then, I need to select an artist name, either be navigating the given list or typing part of it’s name. The list is nicely filtered, courtesy of StumpWM’s input message boxes. A similar effect can be achieved with dmenu, for example.

After that, the top songs from the selected artist, according to last.fm top tracks list, start playing, one after another. You can see what is currently playing with another keybinding.

Other possibilities are available, like playing a single song based on some quick lyrics search: input a keyword and then filter the results. Hit enter, and Aerosmith is playing now.

playing song


  • Play any artist, similar artists, songs, albums, tags or your very own crafted list
  • Keybindings can be set to play next song, previous song, pause the player, open the currently playing song in the default browser (youtube page), display the song lyrics or add the song to favorites
  • Shuffle enabled by default on similar artists or genres, similar to last.fm; for single artist play, shuffle can be enabled or disabled before starting the player.
  • Uses mpv with the youtube-dl plugin as a player behind the scenes
  • Because the player is implemented using a local database and a local webserver, all the functionality is available inside the browser as well.

localhost artist

Ideas for the future

It works, but it’s buggy, so this is not officially released. In the meantime, there are some ideas for improvement. If you have any, you can open a ticket or mail me.

First, adding the option to also play local files would be useful. That would mean a more responsive app since it doesn’t depend on last.fm and youtube and it also means you can play your flac files if you’re so inclined.

Besides last.fm favorites lists, info regarding top songs, or albums from other sites can be used to create playable lists. For example, metalstorm has these lists based on user rating, like “best albums in this genre”, “best albums of 1999” or “best 200 albums of all time” and these sort of things. The albums info is already available on last.fm. That means it should be possible to shuffle play all the songs on these 200 albums by selecting the “best 200 albums according to metalstorm” list in the playlist selection (see first gif). That would be a nice and lazy way to discover new songs.

On the other hand, downloading and parsing a new artist from last.fm takes a long time (seconds). Maybe using the last.fm API directly would speed up things a bit as it would also mean making fewer calls to last.fm in the first place. There is a cl-lastfm package for Common Lisp but I haven’t tried it and it also seems to be in a bad shape. On the negative side, using an API would mean the users would need a last.fm account and an API key to use the player. Best case scenario: keep both implementations and for a speedup, users could use an API key.