blob: e8df41f90f9d3f1a6d73025c7832c7af77393da4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
;; Elpa packages: org-pomodoro
(use-package org-pomodoro
:ensure t
:commands (org-pomodoro)
:hook
(org-pomodoro-started . (lambda () (notifications-notify
:title "Pomodoro"
:body "Let's focus for 25 minutes!"
:app-icon "~/.emacs.d/img/001-food-and-restaurant.png")))
(org-pomodoro-finished . (lambda () (notifications-notify
:title "Pomodoro"
:body "Well done! Take a break."
:app-icon "~/.emacs.d/img/004-beer.png")))
:config
(setq org-pomodoro-length 25)
(setq org-pomodoro-short-break-length 5)
(setq org-pomodoro-long-break-length 15)
(setq org-pomodoro-play-sounds nil))
(defun my/org-pomodoro-text-time ()
"Return status info about org-pomodoro and if org-pomodoro is not running, try to print info about org-clock.
If either org-pomodoro or org-clock aren't active, print \"No Active Task \" "
(interactive)
(cond ((equal :none org-pomodoro-state)
(if (org-clock-is-active)
(format "Clocked task: %d minutes - %s"
(org-clock-get-clocked-time) (substring-no-properties org-clock-heading))
"No Active task"))
((equal :pomodoro org-pomodoro-state)
(format "%d - Pomodoro: %d minutes - %s"
org-pomodoro-count (/ (org-pomodoro-remaining-seconds) 60) (substring-no-properties org-clock-heading)))
((equal :short-break org-pomodoro-state) "Short Break")
((equal :long-break org-pomodoro-state) "Long Break")))
|