ui/doom: improve doom-buffer-mode heuristic
This commit is contained in:
parent
2e280171f5
commit
7dbb162658
1 changed files with 3 additions and 6 deletions
|
@ -54,15 +54,12 @@
|
||||||
(push (cons 'background-color (face-background 'default)) default-frame-alist)
|
(push (cons 'background-color (face-background 'default)) default-frame-alist)
|
||||||
(push (cons 'foreground-color (face-foreground 'default)) default-frame-alist)
|
(push (cons 'foreground-color (face-foreground 'default)) default-frame-alist)
|
||||||
|
|
||||||
;; brighter source buffers
|
;; brighter real buffers
|
||||||
(defun +doom|buffer-mode-on ()
|
(defun +doom|buffer-mode-on ()
|
||||||
"Brightens buffers so long as they represent files and aren't popups."
|
|
||||||
(when (and (not doom-buffer-mode)
|
(when (and (not doom-buffer-mode)
|
||||||
(not doom-popup-mode)
|
(doom-real-buffer-p))
|
||||||
buffer-file-name)
|
|
||||||
(doom-buffer-mode +1)))
|
(doom-buffer-mode +1)))
|
||||||
(add-hook 'find-file-hook '+doom|buffer-mode-on)
|
(add-hook 'after-change-major-mode-hook '+doom|buffer-mode-on)
|
||||||
(add-hook 'after-revert-hook '+doom|buffer-mode-on)
|
|
||||||
|
|
||||||
;; Popup buffers should always be dimmed
|
;; Popup buffers should always be dimmed
|
||||||
(defun +doom|buffer-mode-off ()
|
(defun +doom|buffer-mode-off ()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue