aboutsummaryrefslogtreecommitdiff
path: root/bard-elisp/bard-calendar.el
diff options
context:
space:
mode:
authorBardofSprites <[email protected]>2025-04-04 11:20:11 -0400
committerBardofSprites <[email protected]>2025-04-04 11:20:11 -0400
commit49a3ce51b13b09804166e021dc8ce8cbaa2e3dbc (patch)
tree0805e8e7478563bc26df69249ff916f2bd343cc7 /bard-elisp/bard-calendar.el
parent23e351d112a2e5990129acdf318c7d6767b45bf8 (diff)
auto clock in when starting task
Diffstat (limited to 'bard-elisp/bard-calendar.el')
-rw-r--r--bard-elisp/bard-calendar.el13
1 files changed, 13 insertions, 0 deletions
diff --git a/bard-elisp/bard-calendar.el b/bard-elisp/bard-calendar.el
index 1e3cdb2..b32b9db 100644
--- a/bard-elisp/bard-calendar.el
+++ b/bard-elisp/bard-calendar.el
@@ -1,5 +1,18 @@
+(require 'org)
+
;; Org Clock
+(defun bard/auto-clock-in ()
+ "Automatically clock in when task marked in progress (INPROG)."
+ (when (equal (org-get-todo-state) "INPROG")
+ (org-clock-in))
+ (when (equal (org-get-todo-state) "DONE")
+ (org-clock-out)))
+
+(defun test-func ()
+ (interactive)
+ (message (org-get-todo-state)))
+
(defun bard/org-clock-report ()
(interactive)
(bard/new-org-buffer)