Skip to content

Instantly share code, notes, and snippets.

@selahattinunlu
Created June 30, 2014 16:54
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 selahattinunlu/86f31b29a219f581142a to your computer and use it in GitHub Desktop.
Save selahattinunlu/86f31b29a219f581142a to your computer and use it in GitHub Desktop.
Tinker App Android'e gelene kadar idare edicez :)
#!/bin/bash
countdown()
(
IFS=:
set -- $*
secs=$(( ${1#0} * 3600 + ${2#0} * 60 + ${3#0} ))
while [ $secs -gt 0 ]
do
sleep 1 &
printf "\r%02d:%02d:%02d" $((secs/3600)) $(( (secs/60)%60)) $((secs%60))
secs=$(( $secs - 1 ))
wait
done
echo
)
# Input: Task Title
echo "Gorev basligi:"
read task_title
# Input: Task Time
echo "Geri sayim suresi (xx:xx:xx) seklinde:"
read task_time
# Countdown
countdown $task_time
# Notify Message
notify_msg="$task_title baslikli gorev icin ayirdigin sure doldu!"
# Notifications
#notify-send "$notify_msg"
zenity --info --title "Sure Doldu!" --text "$notify_msg"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment