Skip to content

Instantly share code, notes, and snippets.

@ughitsaaron
Created June 19, 2020 15:31
Show Gist options
  • Save ughitsaaron/2370173ef0bd4b20acaf00ea9b689fd1 to your computer and use it in GitHub Desktop.
Save ughitsaaron/2370173ef0bd4b20acaf00ea9b689fd1 to your computer and use it in GitHub Desktop.
timer.sh
#!/bin/zsh
# For Mac only. Will play a Glass "ding" until the process is terminated manually
# after a given amount of time, e.g.,
# $ timer 5m
# $ timer 30s
# $ timer 1h
# Source this file in you .zsh_profile or .zshrc
# Requires https://github.com/trehn/termdown
# pip install termdown
timer() {
termdown $@ &&
while true; do
afplay /System/Library/Sounds/Glass.aiff;
sleep 0.33;
done;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment