From ac8b1eb116ceec21c0875dbe7661ae9d90f4e3ad Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 11 Nov 2021 22:17:53 +0000 Subject: not toggling inactive mode line in docs workspace --- init.org | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'init.org') diff --git a/init.org b/init.org index c8dd9f7..88cd745 100644 --- a/init.org +++ b/init.org @@ -697,8 +697,15 @@ (interactive) (message "%s" (format-mode-line mode-line-format))) + (defun jao--set-inactive-face (x frame) + (unless (eq x (face-attribute 'mode-line-inactive :height frame)) + (set-face-attribute 'mode-line-inactive frame :height x))) + (defun jao--hide-inactive-mode-line (frame) - (set-face-attribute 'mode-line-inactive frame :height 1)) + (jao--set-inactive-face 1 frame)) + + (defun jao--show-inactive-mode-line (frame) + (jao--set-inactive-face 'unspecified frame)) (add-to-list 'after-make-frame-functions #'jao--hide-inactive-mode-line) @@ -1018,6 +1025,7 @@ (window-height . ,(or height 25)))) (defmacro jao-with-attached-buffer (name-rx height &rest body) + (declare (indent defun)) `(let ((display-buffer-alist '(,(jao-attached-buffer-entry name-rx height)))) ,@body)) @@ -1216,6 +1224,13 @@ (add-hook 'jao-afio-switch-hook #'tracking-remove-visible-buffers) (jao-minibuffer-add-variable '(jao-current--frame-id) 100) + + (defun jao-afio--set-mode-line () + (if (string= "Docs" (jao-afio-current-frame)) + (jao--show-inactive-mode-line nil) + (jao--hide-inactive-mode-line nil))) + + (add-hook 'jao-afio-switch-hook #'jao-afio--set-mode-line) #+end_src * Writing and writing modes *** Org mode -- cgit v1.2.3