About a week ago, I realized that they’d started to duplicate each others’ functionality and refactored them into a single script which has different default behaviours depending on what it’s called as (but you can also use command-line flags).
- Add the given paths to the playlist.
aqbut start the first one playing too.
locate -ito search for the first argument, filter for known media types and filter for the following arguments, then display a chooser.
laqbut start the first one playing too.
- Randomly select
-n NUMsongs (default: 10) from the paths provided (default:
XDG_MUSIC_DIR) and add them to the playlist.
rapbut start the first one playing too.
…and all of these are just aliases to options listed in
Until two days ago, the chooser was a simple little thing where you were given a numbered list of filenames and you typed in a sequence of numbers, optionally including Python-style
start:stop slice syntax.
Now, if you’ve got urwid installed, you get a nice ncurses-style pseudo-GUI, complete with mouse interaction… though the scroll wheel support is preliminary and I’m still trying to figure out how to set up Tab-based focus switching.
Here’s a screenshot:
I haven’t had time to fully bring the codebase up to spec, write the last few new features, and write a test suite for it, but it’s good enough for my day-to-day use so, if you want to give it a try, it’s on GitHub in ssokolow/profile as home/bin/lap.
The queue option in the chooser can be toggled via the
Q key or
Meta+Q and, once you’ve selected all the tracks you want using
Spacebar or the mouse, press
Enter to commit.
In case I ever move it to its own repo and forget to update the link, you can also grab the revision at the time of this posting.
This work, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.