diff options
author | Raul Benencia <raul@thousandeyes.com> | 2020-04-22 13:38:35 -0700 |
---|---|---|
committer | Raul Benencia <raul@thousandeyes.com> | 2020-04-22 13:38:35 -0700 |
commit | 3d72d2bf47ca301f1ca949eb101c8a7d0f6d88c6 (patch) | |
tree | 499b7e00a8ba7b6c9a963c7a650236532cb0145f | |
parent | dacf8629d2f1b50e85802ae3369776f36be4bdeb (diff) |
org-pomodoro
-rw-r--r-- | .emacs | 1 | ||||
-rw-r--r-- | .emacs.local.d/modes/org-pomodoro.el | 22 |
2 files changed, 23 insertions, 0 deletions
@@ -34,6 +34,7 @@ (load-file "~/.emacs.local.d/modes/magit.el") (load-file "~/.emacs.local.d/modes/neotree.el") (load-file "~/.emacs.local.d/modes/org.el") +(load-file "~/.emacs.local.d/modes/org-pomodoro.el") (load-file "~/.emacs.local.d/modes/package.el") (load-file "~/.emacs.local.d/modes/projectile.el") (load-file "~/.emacs.local.d/modes/python.el") diff --git a/.emacs.local.d/modes/org-pomodoro.el b/.emacs.local.d/modes/org-pomodoro.el new file mode 100644 index 0000000..b0bdb35 --- /dev/null +++ b/.emacs.local.d/modes/org-pomodoro.el @@ -0,0 +1,22 @@ +;; Elpa packages: org-pomodoro + +(use-package org-pomodoro + :ensure t + :commands (org-pomodoro) + :config + (setq alert-user-configuration (quote ((((:category . "org-pomodoro")) libnotify 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"))) |