Created
March 4, 2017 02:05
-
-
Save enolan/a2d475e76c03011cd39cd21962f73112 to your computer and use it in GitHub Desktop.
Bash scripts for making a noise when a process finishes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I often start some command that takes a while (compiling, building containers, model training), | |
# then go and fuck around on the internet while waiting for it to finish. These scripts play the | |
# SCV "job's finished" sample from StarCraft when the process exits :) | |
# Usage: | |
# $ thing-that-takes-a-while ; talk | |
# Or, if you realize the thing's going to take a while after it starts: | |
# $ waitprocess $PID | |
# You need an mp3 in ~/jobs-finished.mp3 for this to work. | |
alias talk="echo job\'s finished!;while true;do mplayer -nolirc -really-quiet ~/jobs-finished.mp3;sleep 10;done" | |
function waitprocess { while [ -d /proc/$1 ] ; do sleep 1 ; done ; talk } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment