diff --git a/README.md b/README.md new file mode 100644 index 0000000..b74795d --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# tacc.el +## A pomidoro timer for emacs +tacc implements a slightly modified pomidoro timer with a focus on customizability. Sometimes all you need is a timer to make the pomidoro method work. By default this is just that, a 30 minute timer with a 5 minute break and the option to tag you work session. It can also be easily modified to add or subtract time from each successive work and break cycle and with slightly more effort can be made to process and record your timer stats. + +## Customization +In `M-x customize` both the timer's appearence and behavior can be customized in `Applications` under the group `Tacc`. These can also all be set in your `init.el`, just be aware that `customize` renders a lisp symbol name like `tacc-work-seconds` as "Tacc Work Seconds" + +The root customization dictates the timer length and can be used to set the increment in seconds. As a small bonus to readability, if you set these values in your `init.el` a function `(m:s 1 30)` can for example be used instead of `90`. + +Under the `tacc-behavior` group there are a number of hook and function customizations. These are best to set in your `init.el`, since you can define your functions next to where you `(add-hook)`. + +## Serialization and Record Keeping +If you want to keep a record of your work and break times you can! The catch is that you need to code it yourself. + +Here's a simple example. It doesn't do much, but hopefully it's instructive. + +```lisp +(tacc-register-serialization "json" json-serialize) +(add-hooks 'tacc-json-output-functions (lambda (m) (message "%s" m))) +``` + +The first call generates a binding for a set of output functions, in this case named `tacc-json-output-functions`. All functions in that hook will be fed the result of calling `json-serialize` on a list of time records. + +Time records are laid out in an alist format as follows: + +```lisp +(:ts . ) +(:end . ) +(:state . <'break | 'work>) +(:tag . ) +``` \ No newline at end of file diff --git a/tacc.el b/tacc.el index 48666b3..a4b785f 100644 --- a/tacc.el +++ b/tacc.el @@ -92,15 +92,15 @@ "The length of a base pomodoro round" :type 'integer :group 'tacc) -(defcustom tacc-work-seconds-increment (m:s 5 0) +(defcustom tacc-work-seconds-increment 0 "The time to add to each successive work cycle" :type 'integer :group 'tacc) -(defcustom tacc-break-seconds (m:s 7 0) +(defcustom tacc-break-seconds (m:s 5 0) "The length of a base break round" :type 'integer :group 'tacc) -(defcustom tacc-break-seconds-increment (m:s 1 30) +(defcustom tacc-break-seconds-increment 0 "The time to add to each successive break cycle" :type 'integer :group 'tacc)