Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Public domain license
- # Not original author: Remigijus Jarmalavičius
- #
- # Usage:
- # pomodoro "title for work"
- filename="/home/remigijus/Kodas/smelio-deze/`date '+%Y-%m-%d'`.log"
- while [ 1 ]
- do
- counter=0
- limit=25
- summary="Podoro session"
- startmessage="Start $1!"
- endmessage="Done with $1! New session has started, interrupt to rest a bit."
- notify-send -u critical -i appointment -t 6000 "$summary" "$startmessage"
- echo
- while [ $counter != $limit ]; do
- clear
- echo "Working on $1"
- echo
- if [ -e "$filename" ]
- then
- echo "Today:"
- echo
- sort "$filename" | awk '{print $1}' | uniq -c;
- fi
- echo
- echo "Progress:"
- echo
- echo -en "\t["
- for i in $(seq 1 $counter)
- do
- echo -n "#"
- done
- for i in $(seq 1 $(($limit-$counter)))
- do
- echo -n " "
- done
- echo -n "] $counter/$limit"
- echo
- sleep 60
- let "counter = $counter + 1"
- done
- if [ $counter = $limit ]; then
- echo
- notify-send -u critical -i appointment "$summary" "$endmessage"
- beep
- echo $1 $2 >> "$filename"
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement