From b9fd4258c57aa83b6c9064ec65a42935805973af Mon Sep 17 00:00:00 2001 From: 10sr <8.slashes@gmail.com> Date: Mon, 27 Aug 2018 15:57:02 +0900 Subject: [PATCH] Add minibuffer-line idle timer --- emacs.el | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/emacs.el b/emacs.el index 2c7bfc2..76dc5cb 100644 --- a/emacs.el +++ b/emacs.el @@ -456,6 +456,22 @@ found, otherwise returns nil." (set-face-underline 'minibuffer-line nil) (set-variable 'minibuffer-line-refresh-interval 25) + + ;; Set idle timer + (defvar my-minibuffer-line--idle-timer nil) + (defvar minibuffer-line-mode) + (add-hook 'minibuffer-line-mode-hook + (lambda () + (when my-minibuffer-line--idle-timer + (cancel-timer my-minibuffer-line--idle-timer) + (setq my-minibuffer-line--idle-timer nil)) + (when minibuffer-line-mode + (setq my-minibuffer-line--idle-timer + (run-with-idle-timer 0.5 + t + 'minibuffer-line--update))))) + + (set-variable 'minibuffer-line-format `(,(concat user-login-name "@"