Created
June 30, 2014 16:54
-
-
Save selahattinunlu/86f31b29a219f581142a to your computer and use it in GitHub Desktop.
Tinker App Android'e gelene kadar idare edicez :)
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
#!/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