Posted by mahtaman2 on Fri 11th Feb 06:16 (modification of post by view diff)
download | new post
- #!/bin/bash
- # POMODORO v0.1 by Case Duckworth (mahatman2): mahatman2@gmail.com
- # A technique for Getting Things Done.
- # VARS for time, etc.
- work_time=25s;
- play_time=5s;
- long_break_time=20s;
- btog=""
- btog2=""
- # make sure you want it to run...
- if [ $# -gt 0 ] && [ $1 == "-stop" ];then
- {
- notify-send "Done." "Congratulations! You finished your task."
- killall pomodoro;
- }
- fi
- # function declaration
- function work()
- {
- notify-send "GET$btog TO WORK!" "for$btog2 $work_time";
- sleep $work_time;
- }
- function play()
- {
- notify-send "For $play_time" "Take a well-deserved break, dear.";
- sleep $play_time;
- }
- function long_break()
- {
- notify-send "Take a big break." "It's time for a $long_break_time break. So chill for a bit.";
- sleep $long_break_time;
- }
- # the meat
- while [ -z "$1" ] || [ $1 == "-start" ];do
- {
- work;
- play;
- btog=" BACK";
- btog2=" another";
- work;
- play;
- work;
- play;
- work;
- long_break;
- }
- done
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.