Compare commits

..

No commits in common. "4472cd7867d3d87ab3e3b8a2fa451d1c4fbaf0c1" and "9892cdc0a9be127f796d18dbbbb8bb7ecb59a62b" have entirely different histories.

2 changed files with 19 additions and 9 deletions

19
init.el
View File

@ -658,7 +658,8 @@ split horizontally again, but this extra work should not matter much."
;; * Org
(use-package db-org
:commands (db/org-clock-out
:commands (db/org-update-frame-title-with-current-clock
db/org-clock-out
db/org-clock-in-break-task
db/org-clock-in-home-task
db/org-clock-in-work-task
@ -1102,19 +1103,18 @@ accordingly."
org-clock-out-when-done '("DONE" "CANC" "MRGD" "WAIT" "HOLD")
org-clock-auto-clock-resolution 'when-no-clock-is-running
org-clock-mode-line-total 'auto
org-clock-clocked-in-display 'both
org-clock-report-include-clocking-task t
org-clock-in-switch-to-state #'(lambda (_)
(when (not
(and (boundp 'org-capture-mode)
org-capture-mode))
(cond
((member (org-get-todo-state)
(list "TODO" "READ"))
"CONT")
((member (org-get-todo-state)
(list "GOTO"))
"ATTN"))))
((member (org-get-todo-state)
(list "TODO" "READ"))
"CONT")
((member (org-get-todo-state)
(list "GOTO"))
"ATTN"))))
org-clock-persist t
org-clock-persist-file (expand-file-name "org-clock-save.el" emacs-d-userdata)
org-clock-persist-query-resume nil
@ -1130,6 +1130,7 @@ accordingly."
(org-clock-persistence-insinuate)
(add-hook 'org-clock-in-hook #'db/org-mark-current-default-task)
(add-hook 'org-clock-in-hook #'db/org-update-frame-title-with-current-clock)
;; Clock in default task if no other task is given
(add-hook 'org-clock-out-hook #'db/ensure-running-clock 'append)
@ -2137,7 +2138,7 @@ Note that this workaround is incomplete, as explained in this comment."
:init (setopt solarized-use-less-bold t
solarized-emphasize-indicators t
solarized-use-variable-pitch nil
solarized-high-contrast-mode-line nil))
solarized-high-contrast-mode-line t))
(use-package smart-mode-line
:ensure t

View File

@ -546,6 +546,15 @@ user for the next task to clock into."
(insert "No running clock")
(insert org-clock-heading)))))
(defun db/org-update-frame-title-with-current-clock ()
"Set title of all active frames to the headline of the current task."
(interactive)
(let ((clock-buffer (marker-buffer org-clock-marker)))
(when clock-buffer
(setq frame-title-format org-clock-heading)
(dolist (frame (frame-list))
(modify-frame-parameters frame `((name . ,org-clock-heading)))))))
(defun db/show-current-org-task ()
"Show title of currently clock in task in minibuffer."
(interactive)