summaryrefslogtreecommitdiffhomepage
path: root/lib/eos/jao-minibuffer.el
diff options
context:
space:
mode:
Diffstat (limited to 'lib/eos/jao-minibuffer.el')
-rw-r--r--lib/eos/jao-minibuffer.el25
1 files changed, 23 insertions, 2 deletions
diff --git a/lib/eos/jao-minibuffer.el b/lib/eos/jao-minibuffer.el
index 263f917..1b64a31 100644
--- a/lib/eos/jao-minibuffer.el
+++ b/lib/eos/jao-minibuffer.el
@@ -89,15 +89,36 @@
(erase-buffer)
(insert msg))))
+(defvar jao-minibuffer--mode-line-format
+ '("%1+%n %o (%2l,%2c) " ;; %z
+ (:propertize " %[%b%] " face mode-line-buffer-id)
+ " ("
+ (:propertize mode-name face jao-themes-f00)
+ (:propertize ("" minor-mode-alist (vc-mode vc-mode)) face jao-themes-dimm)
+ ")"
+ mode-line-misc-info))
+
;;;###autoload
-(defun jao-minibuffer-refresh ()
+(defun jao-minibuffer-refresh (&rest _ignore)
(interactive)
(when jao-minibuffer-enabled-p
(jao-minibuffer--insert (or (jao-minibuffer--aligned) ""))))
;;;###autoload
(defun jao-minibuffer-add-variable (variable-name &optional order)
- (add-to-ordered-list 'jao-minibuffer-info `(:eval ,variable-name) order))
+ (let ((v (if (symbolp variable-name) `(:eval ,variable-name) variable-name)))
+ (setq jao-minibuffer-info (remove v jao-minibuffer-info))
+ (add-to-ordered-list 'jao-minibuffer-info v order)))
+
+;;;###autoload
+(defun jao-minibuffer-add-mode-line (order)
+ (setq-default mode-line-format '(" "))
+ (set-face-attribute 'mode-line nil
+ :box nil :height 1 :background "grey70")
+ (set-face-attribute 'mode-line-inactive nil
+ :box nil :height 1 :background "grey90")
+ (advice-add 'force-mode-line-update :after #'jao-minibuffer-refresh)
+ (jao-minibuffer-add-variable 'jao-minibuffer--mode-line-format order))
(defvar jao-minibuffer--notification-timer nil)