notify-at.sh 309 B

1234567891011121314151617
  1. #!/usr/bin/env bash
  2. set -euo pipefail # bash strict mode
  3. display_help(){
  4. echo "Usage: ${0##*/} [time] [message/s]"
  5. echo "Flags:"
  6. echo -e "\t -h --Display help message"
  7. exit 2
  8. }
  9. [[ $# -lt 1 ]] && display_help
  10. time="${1:-now}"
  11. message="${@:2}"
  12. echo "notify-send '${message}'" | at "${time}"