Compare commits

...

3 Commits

Author SHA1 Message Date
4472cd7867
Disable high-contrast mode-line
This reverts d6b731f.  Does not look good :/
2025-06-07 18:51:09 +02:00
b5ceefbea7
Apply some auto indentation 2025-06-07 18:50:59 +02:00
3526563ce1
Let Org set Emacs' frame title
Why replicate functionality that is already there? :)
2025-06-07 18:50:03 +02:00
2 changed files with 9 additions and 19 deletions

19
init.el
View File

@ -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,18 +1102,19 @@ 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
(and (boundp 'org-capture-mode) (and (boundp 'org-capture-mode)
org-capture-mode)) org-capture-mode))
(cond (cond
((member (org-get-todo-state) ((member (org-get-todo-state)
(list "TODO" "READ")) (list "TODO" "READ"))
"CONT") "CONT")
((member (org-get-todo-state) ((member (org-get-todo-state)
(list "GOTO")) (list "GOTO"))
"ATTN")))) "ATTN"))))
org-clock-persist t org-clock-persist t
org-clock-persist-file (expand-file-name "org-clock-save.el" emacs-d-userdata) org-clock-persist-file (expand-file-name "org-clock-save.el" emacs-d-userdata)
org-clock-persist-query-resume nil org-clock-persist-query-resume nil
@ -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)
@ -2138,7 +2137,7 @@ Note that this workaround is incomplete, as explained in this comment."
:init (setopt solarized-use-less-bold t :init (setopt solarized-use-less-bold t
solarized-emphasize-indicators t solarized-emphasize-indicators t
solarized-use-variable-pitch nil solarized-use-variable-pitch nil
solarized-high-contrast-mode-line t)) solarized-high-contrast-mode-line nil))
(use-package smart-mode-line (use-package smart-mode-line
:ensure t :ensure t

View File

@ -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)