Advertisement
brianMc

zenTimer

Sep 23rd, 2016
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.78 KB | None | 0 0
  1. #!/bin/bash
  2. # This script asks the user for a time, waits the specified amount
  3. # of time, and shows an alert and zenity dialog and computer speaks
  4. # to say the timer is expired
  5. #requires zenity, espeak, and Unity's notify-send
  6. #If you're using a distro other than Ubuntu just comment out the notify-send line
  7.  
  8. TIME=$(zenity --entry --title="Timer" --text="Enter a duration for the timer.\n\n Use 5s for 5 seconds, 10m for 10 minutes, or 2h for 2 hours." 2>/dev/null);
  9.  
  10. clear;
  11. echo -e "zenTimer is active...\nSet for $TIME";
  12. sleep $TIME;
  13.  
  14. notify-send "Timer Has Expired!" \ "It has been $TIME.";
  15. espeak -s 130 -ven+m3 "The timer expired. The timer is finished, goodbye.";
  16. zenity --info --title="Timer Expired" --text="The timer is done.\n\n It has been $TIME." 2>/dev/null;
  17. clear;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement