Let Org set Emacs' frame title
Why replicate functionality that is already there? :)
This commit is contained in:
parent
9892cdc0a9
commit
3526563ce1
5
init.el
5
init.el
@ -658,8 +658,7 @@ split horizontally again, but this extra work should not matter much."
|
|||||||
;; * Org
|
;; * Org
|
||||||
|
|
||||||
(use-package db-org
|
(use-package db-org
|
||||||
:commands (db/org-update-frame-title-with-current-clock
|
:commands (db/org-clock-out
|
||||||
db/org-clock-out
|
|
||||||
db/org-clock-in-break-task
|
db/org-clock-in-break-task
|
||||||
db/org-clock-in-home-task
|
db/org-clock-in-home-task
|
||||||
db/org-clock-in-work-task
|
db/org-clock-in-work-task
|
||||||
@ -1103,6 +1102,7 @@ accordingly."
|
|||||||
org-clock-out-when-done '("DONE" "CANC" "MRGD" "WAIT" "HOLD")
|
org-clock-out-when-done '("DONE" "CANC" "MRGD" "WAIT" "HOLD")
|
||||||
org-clock-auto-clock-resolution 'when-no-clock-is-running
|
org-clock-auto-clock-resolution 'when-no-clock-is-running
|
||||||
org-clock-mode-line-total 'auto
|
org-clock-mode-line-total 'auto
|
||||||
|
org-clock-clocked-in-display 'both
|
||||||
org-clock-report-include-clocking-task t
|
org-clock-report-include-clocking-task t
|
||||||
org-clock-in-switch-to-state #'(lambda (_)
|
org-clock-in-switch-to-state #'(lambda (_)
|
||||||
(when (not
|
(when (not
|
||||||
@ -1130,7 +1130,6 @@ accordingly."
|
|||||||
(org-clock-persistence-insinuate)
|
(org-clock-persistence-insinuate)
|
||||||
|
|
||||||
(add-hook 'org-clock-in-hook #'db/org-mark-current-default-task)
|
(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
|
;; Clock in default task if no other task is given
|
||||||
(add-hook 'org-clock-out-hook #'db/ensure-running-clock 'append)
|
(add-hook 'org-clock-out-hook #'db/ensure-running-clock 'append)
|
||||||
|
|||||||
@ -546,15 +546,6 @@ user for the next task to clock into."
|
|||||||
(insert "No running clock")
|
(insert "No running clock")
|
||||||
(insert org-clock-heading)))))
|
(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 ()
|
(defun db/show-current-org-task ()
|
||||||
"Show title of currently clock in task in minibuffer."
|
"Show title of currently clock in task in minibuffer."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user