:note

cliでタイマー

sleepコマンドとsayコマンドをつかった適当タイマー

% sleep 5 && say "Time's up"

terminal-notifier をいれて通知も追加してみる。

timer.sh

#!/usr/bin/env bash
if [[ $# == 1 ]]; then
  sleep $1
  terminal-notifier -message "Time's up. $1 sec" -title TIMER 2>/dev/null
  say "Time's up." --voice Victoria
fi

sleep の引数は秒なので5分なら300

% ./timer.sh 300

声はお好みで

# Female Voices
say -v Agnes "hello world"
say -v Kathy "hello world"
say -v Princess "hello world"
say -v Vicki "hello world"
say -v Victoria "hello world"

# Male Voices
say -v Bruce "hello world"
say -v Fred "hello world"
say -v Junior "hello world"
say -v Ralph "hello world"

# Novelty Voices
say -v Albert "hello world"
say -v "Bad News" "hello world"
say -v Bahh "hello world"
say -v Bells "hello world"
say -v Boing "hello world"
say -v Bubbles "hello world"
say -v Cellos "hello world"
say -v Deranged "hello world"
say -v "Good News" "hello world"
say -v Hysterical "hello world"
say -v "Pipe Organ" "hello world"
say -v Trinoids "hello world"
say -v Whisper "hello world"
say -v Zarvox "hello world"
 
comments powered by Disqus
back to top