docs: update docs

This commit is contained in:
SqrtMinusOne 2022-08-14 18:14:21 +05:00
parent 5cdd5ca82d
commit 3367784a0f
2 changed files with 39 additions and 21 deletions

View file

@ -2,18 +2,16 @@
[[https://melpa.org/#/pomm][file:https://melpa.org/packages/pomm-badge.svg]]
Yet another implementation of a [[https://en.wikipedia.org/wiki/Pomodoro_Technique][pomodoro timer]] for Emacs.
Implementation of [[https://en.wikipedia.org/wiki/Pomodoro_Technique][Pomodoro]] and [[https://www.lesswrong.com/posts/RWu8eZqbwgB9zaerh/third-time-a-better-way-to-work][Third Time]] techniques for Emacs.
[[./img/screenshot.png]]
This particular package features:
Features:
- Managing the timer with the excellent [[https://github.com/magit/transient/blob/master/lisp/transient.el][transient.el]].
- Persistent state between Emacs sessions.
The timer state isn't reset if you close Emacs. Also, the state file can be synchronized between machines.
The timer state isn't reset if you close Emacs. If necessary, the state file can be synchronized between machines.
- History.
I've implemented an option to store the timer history in a CSV file. Eventually, I want to join this with [[https://activitywatch.net/][other activity data]] to see if the state of the timer changes how I use the computer.
None of the available [[*Alternatives][alternatives]] were doing quite what I wanted, and the idea of the timer is quite simple, so I figured I'd implement one myself.
History of the timer can be stored in a CSV file. Eventually, I want to join this with [[https://activitywatch.net/][other activity data]] to see if the state of the timer changes how I use the computer.
* Installation
The package is available on MELPA. Install it however you usually install Emacs packages, e.g.
@ -25,14 +23,7 @@ My preferred way is =use-package= with =straight.el=:
#+begin_src emacs-lisp
(use-package pomm
:straight t
:commands (pomm))
#+end_src
If you want sounds before the MELPA recipe got updated to include resources, use:
#+begin_src emacs-lisp
(use-package pomm
:straight (:host github :repo "SqrtMinusOne/pomm.el" :files (:defaults "resources"))
:commands (pomm))
:commands (pomm pomm-thrid-time))
#+end_src
Or you can clone the repository, add the package to the =load-path= and load it with =require=:
@ -42,6 +33,7 @@ Or you can clone the repository, add the package to the =load-path= and load it
The package requires Emacs 27.1 because the time API of the previous versions is kinda crazy and 27.1 has =time-convert=.
* Usage
** Pomodoro
Run =M-x pomm= to open the transient buffer.
The listed commands are rather self-descriptive and match the Pomodoro ideology.
@ -56,9 +48,27 @@ The state of the timer can be reset with "R" or =M-x pomm-reset=.
"u" updates the transient buffer. The update is manual because I didn't figure out how to automate this, and I think this is not /really/ necessary.
With "r" or =M-x pomm-set-context= you can set the current "context", that is some description of the task you are currently working on. This description will show up in history and in the csv file. Also, =M-x pomm-start-with-context= will prompt for the context and then start the timer.
** Third Time
Run =M-x pomm-third-time= to open the transient buffer for the Third Time technique.
[[./img/screenshot-tt.png]]
Essentially, the techique is designed aroud the formula:
#+begin_example
Time of break = 1/3 x Time of work.
#+end_example
I.e. you work as long as you want or need, and then take a break with the maximum duration =1/3= of the time worked. If you take a shorter break, the remaining break time is saved and added to the next break within the same session. [[https://www.lesswrong.com/posts/RWu8eZqbwgB9zaerh/third-time-a-better-way-to-work][Here is a more detailed explanation]].
The Third Time timer can have 2 states:
- *Stopped*. Can be started with "s" or =M-x pomm-third-time-start=.
- *Running*. Can be stopped with "S" or =M-x pomm-third-time-stop=. This resets the accumulated break time.
Use "b" or =M-x pomm-third-time-switch= to switch the current period type (work or break). If the break time runs out, the timer automatically switches to work.
* Customization
Some settings are available in the transient buffer, but you can customize the relevant variables to make them permanent. Check =M-x customize-group= =pomm= for more information.
Some settings are available in the transient buffer, but you can customize the relevant variables to make them permanent. Check =M-x customize-group= =pomm= and =M-x customize-group pomm-third-time= for more information.
** Alerts
The package sends alerts via =alert.el=. The default style of alert is a plain =message=, but if you want an actual notification, set =alert-default-style= accordingly:
@ -67,7 +77,7 @@ The package sends alerts via =alert.el=. The default style of alert is a plain =
#+end_src
** Sounds
By default sounds are disabled. Set =pomm-audio-enabled= to =t= to toggle them.
By default sounds are disabled. Set =pomm-audio-enabled= to =t= to toggle them. Set =pomm-audio-tick-enabled= to =t= if you want the ticking sound.
This functionality needs =pomm-audio-player-executable= to be set so that the program could be invoked like: =<executable> /path/to/sound.wav=.
@ -98,17 +108,23 @@ interval = 1
#+end_src
** State file location
The package stores the current state to a file by the path =pomm-state-file-location=, which is =emacs.d/pomm= by default. Set it to wherever you like.
** History
If you set the =pomm-csv-history-file= variable, the package will write CSV with the usage history there. Just keep in mind that the parent directory has to exist.
To implement pesistence between Emacs sessions, the package stores its state in the following files:
- =pomm-state-file-location=, =.emacs.d/pomm= by default
- =pomm-third-time-state-file-location=, =/.emacs.d/pomm-third-time= by default
The file has the following columns:
Set these paths however like.
** History
If you set the =pomm-csv-history-file= (and/or =pomm-third-time-csv-history-file=) variable, the package will log its history in CSV format. Just keep in mind that the parent directory has to exist.
The file for the Pomodoro technique has the following columns:
- =timestamp=
- =status= (=stopped=, =paused= or =running=, according to the [[*Usage][usage]] section)
- =kind= (=work=, =short-break=, =long-break= or =nil=)
- =iteration=
- =context=
One for the Third Time technique has an extra column called =break-time-remaining=.
A new entry is written after a particular state of the timer comes into being.
To customize timestamp, set the =pomm-csv-history-file-timestamp-format= variable. For example, for traditional =YYYY-MM-DD HH:mm:ss=:
@ -122,7 +138,7 @@ The format is the same as in =format-time-string=.
There is a number of packages with a similar purpose, here is a rough comparison of features:
| Package | 3rd party integrations | Control method (1) | Persistent history | Persistent state | Notifications |
|------------------------+------------------------+--------------------------------+--------------------------+----------------------------------------------+---------------------------|
| [[https://github.com/SqrtMinusOne/pomm.el][pomm.el]] | - | transient.el | CSV | + | alert.el |
| [[https://github.com/SqrtMinusOne/pomm.el][pomm.el]] | - | transient.el | CSV | + | alert.el + sounds |
| [[https://github.com/marcinkoziej/org-pomodoro/tree/master][org-pomodoro]] | Org Mode! | via Org commands | via Org mode | - | alert.el + sounds |
| [[https://github.com/TatriX/pomidor/][pomidor]] | - | self-cooked interactive buffer | custom delimited format? | +, but saving on-demand | alert.el + sounds |
| [[https://github.com/baudtack/pomodoro.el/][pomodoro.el]] | - | - | - | - | notifications.el + sounds |
@ -133,6 +149,8 @@ Be sure to check those out if this one doesn't quite fit your workflow!
(1) Means of timer control with exception of Emacs interactive commands
Also take a look at [[https://github.com/telotortium/org-pomodoro-third-time][org-pomodoro-third-time]], which adapts =org-pomodoro= for the Third Time technique.
* P.S.
The package name is not an abbreviation. I just hope it doesn't mean something horrible in some language I don't know.

BIN
img/screenshot-tt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 KiB