More reliable ring-bell-function mode-line blink
This commit is contained in:
parent
515e9f336e
commit
4ce2739983
1 changed files with 8 additions and 3 deletions
|
@ -60,11 +60,16 @@
|
||||||
|
|
||||||
;; A subtle bell: flash the mode-line
|
;; A subtle bell: flash the mode-line
|
||||||
;; TODO More flexible colors (only suits dark themes)
|
;; TODO More flexible colors (only suits dark themes)
|
||||||
|
(defvar doom--modeline-bg nil)
|
||||||
|
|
||||||
(setq ring-bell-function
|
(setq ring-bell-function
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(let ((bg (face-attribute 'mode-line :background)))
|
(unless doom--modeline-bg
|
||||||
(set-face-attribute 'mode-line nil :background "#54252c")
|
(setq doom--modeline-bg (face-attribute 'mode-line :background)))
|
||||||
(run-with-timer 0.1 nil `(lambda () (set-face-attribute 'mode-line nil :background ,bg))))))
|
(set-face-attribute 'mode-line nil :background "#54252C")
|
||||||
|
(run-with-timer
|
||||||
|
0.1 nil
|
||||||
|
(lambda () (set-face-attribute 'mode-line nil :background doom--modeline-bg)))))
|
||||||
|
|
||||||
|
|
||||||
;; y/n instead of yes/no
|
;; y/n instead of yes/no
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue