Skip to content

Instantly share code, notes, and snippets.

@RJ722
Created April 17, 2020 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RJ722/5a411efc7c99c34083c77ddc757168bf to your computer and use it in GitHub Desktop.
Save RJ722/5a411efc7c99c34083c77ddc757168bf to your computer and use it in GitHub Desktop.
Spacemacs configuration for Operation Manhattan
;; Add the following inside (defun dotspacemacs/user-config ()
;; Load the scrum.el file.
(load-file "~/emacs-pack/scrum.el")
(define-skeleton insert-org-manhattan-entry
"Prompt for task, estimate and category"
nil
'(setq task (skeleton-read "Task: "))
'(setq estimate (skeleton-read "Estimate: "))
'(setq timestamp (format-time-string "%s"))
"** " task \n
":PROPERTIES:" \n
":ESTIMATED: " estimate \n
":ACTUAL:" \n
":OWNER: <YOUR_USERNAME_HERE>" \n
":ID: READ." timestamp \n
":TASKID: READ." timestamp \n
":END:")
(setq org-hide-leading-stars t)
(defun org-update-actuals ()
(interactive)
(org-entry-put (point) "ACTUAL"
(format "%0.2f" (/ (org-clock-sum-current-item) 60.0))))
;; For visual appeal, highlight TODOs and strike through the completed ones.
(defun my/modify-org-done-face ()
(setq org-fontify-done-headline t)
(custom-set-faces
'(org-done ((t (:foreground "PaleGreen"
:weight normal
:strike-through t))))
'(org-headline-done
((((class color) (min-colors 16) (background dark))
(:foreground "LightSalmon" :strike-through t))))))
(spacemacs/set-leader-keys "aoi" 'insert-org-manhattan-entry)
(spacemacs/set-leader-keys "aou" 'org-update-actuals)
(spacemacs/set-leader-keys "aoU" 'scrum-update-all)
(eval-after-load "org"
(add-hook 'org-add-hook 'my/modify-org-done-face))
(setq org-src-fontify-natively t)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment