diff options
| author | BardofSprites <[email protected]> | 2024-09-20 06:08:14 -0400 |
|---|---|---|
| committer | BardofSprites <[email protected]> | 2024-09-20 06:08:14 -0400 |
| commit | ab4e16a181959cce87aae64fd03f1d0d2eb76d87 (patch) | |
| tree | 04b1650ad670837fc429754b2c12ba16f3d51d52 /bard-elisp | |
| parent | 6d879b744e039fe27e60cdd7f152e4117369101d (diff) | |
move time management to another file
Diffstat (limited to 'bard-elisp')
| -rw-r--r-- | bard-elisp/bard-calendar.el | 44 |
1 files changed, 44 insertions, 0 deletions
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 |
