I want to listen to my music from command line,
but I have a meeting in 20 minutes!
timeout 20m pianobar || reset
^ use this one
‘s’ for seconds (the default)
‘m’ for minutes
‘h’ for hours
‘d’ for days
https://stackoverflow.com/a/16436335/5283424
https://www.gnu.org/software/coreutils/manual/html_node/timeout-invocation.html#timeout-invocation
This would also be great for teaching yourself to switch tasks.
Instead of spending the entire day on a single item.
timeout 20s pianobar || reset
# reset the terminal if the cursor gets stuck (stdio) after pianobar process is killed.
timeout 20m pianobar || reset
alias pianomin="timeout 20m pianobar; reset"
function pianomin() {
time=${1:-20};
ask="timeout ${time}m pianobar; reset";
echo $ask;
eval $ask;
}