From ab4e16a181959cce87aae64fd03f1d0d2eb76d87 Mon Sep 17 00:00:00 2001 From: BardofSprites <89086143+BardofSprites@users.noreply.github.com> Date: Fri, 20 Sep 2024 06:08:14 -0400 Subject: move time management to another file --- bard-elisp/bard-calendar.el | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 bard-elisp/bard-calendar.el (limited to 'bard-elisp') diff --git a/bard-elisp/bard-calendar.el b/bard-elisp/bard-calendar.el new file mode 100644 index 0000000..9e5be52 --- /dev/null +++ b/bard-elisp/bard-calendar.el @@ -0,0 +1,44 @@ +;; Org Clock + +(defun bard/org-clock-report () + (interactive) + (bard/new-org-buffer) + (org-clock-report)) + +(defun bard/org-clock-update-mode-line () + (interactive) + (setq org-mode-line-string nil) + (force-mode-line-update)) + +(defun bard/org-clock-task-string () + "Return a simplified org clock task string." + (if (and (boundp 'org-mode-line-string) + (not (string-equal "" org-mode-line-string)) + org-mode-line-string) + (substring-no-properties org-mode-line-string) + "No task clocked in")) + +;; ----- + +;; Org Agenda + +(defun bard/choose-agenda () + "For viewing my custom agenda" + (interactive) + (let ((agenda-views '("Default" "Monthly" "Yearly"))) + (setq chosen-view (completing-read "Choose an agenda view: " agenda-views)) + (cond + ((string= chosen-view "Yearly") + (org-agenda nil "Y")) + ((string= chosen-view "Monthly") + (org-agenda nil "M")) + ((string= chosen-view "Default") + (org-agenda nil "D"))))) + +(defun bard/default-agenda () + "For viewing my custom agenda" + (interactive) + (org-agenda nil "D")) + +(provide 'bard-calendar) +;;; bard-calendar.el ends here -- cgit v1.2.3