summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--exwm.org1
-rw-r--r--init.org15
-rw-r--r--lib/eos/jao-minibuffer.el25
3 files changed, 32 insertions, 9 deletions
diff --git a/exwm.org b/exwm.org
index c26810d..db82272 100644
--- a/exwm.org
+++ b/exwm.org
@@ -103,6 +103,7 @@
(add-hook 'exwm-mode-hook 'jao-exwm--set-exwm-name)
(add-hook 'exwm-update-class-hook 'jao-exwm-rename-buffer/class)
+ (add-hook 'exwm-update-title-hook 'jao-minibuffer-refresh)
(add-hook 'exwm-update-title-hook 'jao-exwm-rename-buffer/title)
#+end_src
* Float windows
diff --git a/init.org b/init.org
index 8591585..3e2052d 100644
--- a/init.org
+++ b/init.org
@@ -287,10 +287,6 @@
"%L %r %B (%p%% load, remaining time %t)"
battery-mode-line-format "%b%p "))
(display-battery-mode 1)
- (setq global-mode-string
- (delq 'battery-mode-line-string global-mode-string))
- (with-eval-after-load "jao-minibuffer"
- (jao-minibuffer-add-variable 'battery-mode-line-string 80))
#+end_src
* Crypto
*** PGP, EPG, passwords
@@ -499,9 +495,9 @@
(jao-load-org "exwm.org")
(setq jao-exwm-enabled-p t)
(display-time-mode -1)
- (jao-ednc-setup 90)
(exwm-enable)
- (jao-toggle-inactive-mode-line t)
+ (jao-ednc-setup 95)
+ (jao-minibuffer-add-mode-line 90)
(jao-trisect t)
(jao-exwm-xmobar)
(jao-nm-applet)
@@ -749,7 +745,12 @@
:config
(setq erc-track-enable-keybindings nil)
- :bind (("C-c C-SPC" . tracking-next-buffer)))
+ (defun jao-tracking-next-buffer ()
+ (interactive)
+ (tracking-next-buffer)
+ (jao-minibuffer-refresh))
+
+ :bind (("C-c C-SPC" . jao-tracking-next-buffer)))
(defun jao-shorten-modes (&rest modes)
(dolist (m modes) (add-to-list 'tracking-shorten-modes m)))
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)