Last active
September 7, 2023 08:43
-
-
Save drazulay/b2c1b1bde7ebf21e328c5ccbb1bf60b5 to your computer and use it in GitHub Desktop.
A terminal alias implementing an alarm clock.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: wekker 21:04 /path/to/audiofile.mp3. | |
# Add this to your ~/.profile or wherever you store your aliases. | |
# You could run it from crontab. | |
alias wekker='_wekker(){ printf "you will be woken up at %s with audio file %s\n" "$1" "$2"; while [ 1 ]; do; date "+%H:%M" | grep -q "$1"; [[ $? -eq 0 ]] && open -a VLC "$2" && break || sleep 1; done; }; _wekker' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment