aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2022-08-11 16:44:50 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2022-09-14 00:45:42 +0100
commite1f7953786ef87392f9356bb02c213d0ede50f17 (patch)
tree7c9786afbddc1ab47070cb6b8e7e8bf36605e1f2
parent6abe0dcf1a4c0f2a74171370880a9e0e6113a7c5 (diff)
downloaddotfiles-e1f7953786ef87392f9356bb02c213d0ede50f17.tar.gz
dotfiles-e1f7953786ef87392f9356bb02c213d0ede50f17.tar.bz2
dotfiles-e1f7953786ef87392f9356bb02c213d0ede50f17.zip
(Emacs)+org-clock-report functionality
Provides the ability to generate a report in your file, and also an advice which (when a toggle is enabled) regenerates the top level report after clock out.
-rw-r--r--Emacs/.config/emacs/config.org19
1 files changed, 17 insertions, 2 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org
index 3c2571f..8fbeabe 100644
--- a/Emacs/.config/emacs/config.org
+++ b/Emacs/.config/emacs/config.org
@@ -2341,17 +2341,32 @@ a very tidy way to manage your time.
#+end_src
*** Org clock-in
Org provides a nice timekeeping system that allows for managing how
-much time is taken per task.
+much time is taken per task. It even has an extensive reporting
+system to see how much time you spend on specific tasks or overall.
#+begin_src emacs-lisp
(use-package org-clock
:after org
:straight nil
+ :init
+ (defvar +org/clock-out-toggle-report nil
+ "Non-nil means update the first clock report in the file every
+time a clock out occurs.")
+ :config
+ (advice-add #'org-clock-out
+ :after
+ (proc (interactive)
+ (if +org/clock-out-toggle-report
+ (org-clock-report t))))
:general
(local-leader
:keymaps 'org-mode-map
:infix "c"
"c" #'org-clock-in
- "o" #'org-clock-out))
+ "o" #'org-clock-out
+ "r" #'org-clock-report
+ "t" (proc (interactive)
+ (setq-local +org/clock-out-toggle-report
+ (not +org/clock-out-toggle-report)))))
#+end_src
** C/C++
Setup for C and C++ modes via the cc-mode package. C and C++ are