diff options
| author | BardofSprites <[email protected]> | 2024-08-17 17:08:13 -0400 |
|---|---|---|
| committer | BardofSprites <[email protected]> | 2024-08-17 17:08:41 -0400 |
| commit | cf3bb8eed34a229abd7f00e64d51fea9b5c30168 (patch) | |
| tree | e3101cf1776cf3b7fd6658cd6707f86f8a4509ea /bard-emacs-modules | |
| parent | 33befd86c8bb68b5f5430b7c9fc1d1d998f08fa7 (diff) | |
huge org clock upgrade
Diffstat (limited to 'bard-emacs-modules')
| -rw-r--r-- | bard-emacs-modules/bard-emacs-org.el | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/bard-emacs-modules/bard-emacs-org.el b/bard-emacs-modules/bard-emacs-org.el index ce906fa..98ab264 100644 --- a/bard-emacs-modules/bard-emacs-org.el +++ b/bard-emacs-modules/bard-emacs-org.el @@ -107,24 +107,43 @@ ;;; Org Agenda ;; clock tables -(setq org-clock-clocktable-default-properties '(:maxlevel 7 :scope agenda)) +(setq org-clock-clocktable-default-properties '(:maxlevel 7 :scope agenda) + org-clock-persist 'history) +(org-clock-persistence-insinuate) (defun bard/org-clock-report () (interactive) (bard/new-org-buffer) (org-clock-report)) +(use-package org-mode + :demand t + :config + (defun bard/org-clock-update-mode-line () + (setq org-mode-line-string nil) + (force-mode-line-update)) + :hook + ((org-clock-out . bard/org-clock-update-mode-line))) + +(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")) + (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"))))) + (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"))))) (global-set-key (kbd "M-<f1>") 'bard/choose-agenda) (global-set-key (kbd "C-c a c") 'bard/choose-agenda) |
