Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@earendildev
Forked from pplantinga/alarm.sh
Created November 22, 2022 06:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save earendildev/e66b02af7babccdce34710caa0d9a248 to your computer and use it in GitHub Desktop.
Save earendildev/e66b02af7babccdce34710caa0d9a248 to your computer and use it in GitHub Desktop.
Want to set an alarm via OS X terminal? It's easy, just use this!
#!/bin/bash
# Simple script for setting an alarm on Mac OS X
# Arguments are ./alarm.sh {hour} {minute}
until [ `date "+%H"` -eq $1 ] && [ `date "+%M"` -eq $2 ]; do
sleep 10
done
osascript -e 'set volume 7'
say -v Trinoids "WARNING WARNING WARNING"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment