New project: think (Terminal Think Music)
Are you executing a process that takes a long time? Do you want to know that it’s still working while you are in another terminal/making coffee? Do you have a favorite game show tune to play while doing something?
think is just for you. For more details, read on or hop onto the GitHub page.
You can install
think from PyPI (with
pip install think). Arch Linux
users can install the
think package from the AUR.
Create a file named
~/.config/think.conf (or wherever your
XDG_CONFIG_HOME is) with the following four lines:
commandis the command of the player that will be executed. You can use
sox) or any other fast CLI music player.
fileis the filename that will be given as the sole argument to the play command. No escaping is necessary. I’m using the Wielka Gra theme (BTW: I just published the MP3 file on the 1st anniversary of the upload!), Americans might want Jeopardy! Think Music (also the namesake for this command), Brits might want the Countdown theme.
behaviorcan be one of:
return— return control to the terminal as soon as the program finishes, without stopping the music
wait— wait until music stops before returning control
stop— stop the music and return control immediately
think before the command that takes too long to execute: