dip

old school recipes for janitorial snafu.
git clone git://git.ricketyspace.net/dip.git
Log | Files | Refs

commit dce2fcd4ab25dabb3e98b4e1804360228db4ecdf
parent c6e47f2a76bb02e3bcd14104f9af67432333300b
Author: rsiddharth <s@ricketyspace.net>
Date:   Thu, 24 May 2018 22:14:54 +0000

usr: Add timer (from dotfiles).

Diffstat:
usr/local/bin/timer | 26++++++++++++++++++++++++++
1 file changed, 26 insertions(+), 0 deletions(-)

diff --git a/usr/local/bin/timer b/usr/local/bin/timer @@ -0,0 +1,26 @@ +#!/bin/sh +# +# License: CC0-1.0 +# +# Usage +# +# $ timer [SECS] [MINS] +# + +if [ ! -z $1 ]; then + SECS=$1 +else + SECS=0 +fi + +if [ ! -z $2 ]; then + MINS=$2 +else + MINS=0 +fi + +# Calculate delay. +FOR=$(($SECS + ($MINS * 60))) + +echo "Will disturb in " $FOR "seconds." +sleep $FOR; mpc play