diff options
Diffstat (limited to 'init-el.org')
-rw-r--r-- | init-el.org | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/init-el.org b/init-el.org index d670954..5258165 100644 --- a/init-el.org +++ b/init-el.org @@ -229,7 +229,7 @@ So, to use this file for the very first time you must ** Org Mode Main Config #+name: org-mode-main-config -#+begin_src elisp :noweb no-export +#+begin_src elisp :noweb no-export :results none (package-install 'org) (setq org-duration-format 'h:mm) @@ -269,8 +269,26 @@ So, to use this file for the very first time you must (insert "\n") (insert (format "#+begin_src %s :noweb no-export\n\n#+end_src" lang))) +(defvar +cicadas-surf-task-status-file+ "/ssh:colin@cicadas.surf:~/.task") + +(defun clock-in-external-log-advice (&rest args) + "to be added as advice to org-clock-in" + (when +cicadas-surf-task-status-file+ + (with-temp-buffer + (insert (org-clock-get-clock-string)) + (write-file +cicadas-surf-task-status-file+)))) + +(defun clock-out-external-log-advice (&rest args) + (when +cicadas-surf-task-status-file+ + (with-temp-buffer + (write-file +cicadas-surf-task-status-file+)))) + +(advice-add 'org-clock-in :after #'clock-in-external-log-advice) +(advice-add 'org-clock-out :after #'clock-out-external-log-advice) #+end_src +#+RESULTS: org-mode-main-config + ** Org Mode and Babel Configuration |