summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfpi2020-11-06 16:56:17 +0100
committerfpi2020-11-06 16:57:58 +0100
commit18d64469d5f0be8f049be0131e07fb2a86c68fca (patch)
treee00c4c4c43dc3d5fb55868eab9645ae7acb06cb3
parentAdd link as ROAM_KEY for roam-protocol ref captures (diff)
Add function to toggle org time budgets
Diffstat (limited to '')
-rw-r--r--emacs-init.org20
1 files changed, 17 insertions, 3 deletions
diff --git a/emacs-init.org b/emacs-init.org
index 3d6e4ed..b0cb36f 100644
--- a/emacs-init.org
+++ b/emacs-init.org
@@ -3599,12 +3599,26 @@ Gives an overview of time spent on defined budgets this week. Great to track if
:straight (:host github :repo "fpiper/org-time-budgets"
:branch "develop"
:no-byte-compile t)
- :custom
- (org-time-budgets '((:title "Work" :match "+work-nowork" :budget "40:00" :blocks (workday week))
+ :config
+ (setq fpi/dense-time-budgets
+ '((:title "Work" :match "+work-nowork" :budget "40:00" :blocks (workday week))
+ (:title "Personal" :match "+nowork-nonprod" :budget "5:00" :blocks (nil week))))
+ (setq fpi/wide-time-budgets
+ '((:title "Work" :match "+work-nowork" :budget "40:00" :blocks (workday week))
(:title "├Research" :match "+work+research" :budget "24:00" :blocks (nil week))
(:title "├Teaching" :match "+work+teaching" :budget "8:00" :blocks (nil week))
(:title "╰Reading" :match "+work+read" :budget "5:00" :blocks (workday week))
- (:title "Personal" :match "+nowork-nonprod" :budget "5:00" :blocks (nil week)))))
+ (:title "Personal" :match "+nowork-nonprod" :budget "5:00" :blocks (nil week))))
+ (setq org-time-budgets fpi/wide-time-budgets)
+ (defun fpi/toggle-time-budgets ()
+ "Toggle between dense and wide time budgets."
+ (interactive)
+ (if (eq org-time-budgets fpi/wide-time-budgets)
+ (progn
+ (setq org-time-budgets fpi/dense-time-budgets)
+ (message "Set dense time budgets"))
+ (setq org-time-budgets fpi/wide-time-budgets)
+ (message "Set wide time budgets"))))
#+end_src
**** Column view
#+begin_src emacs-lisp