diff --git a/init.el b/init.el index 7775986e..b8faa6f7 100755 --- a/init.el +++ b/init.el @@ -181,41 +181,45 @@ (defvar-local mk/mode-line-format '("%e" mode-line-front-space "%Z" " " "%b %*%n %I %l:%c %p" (vc-mode vc-mode) " " mode-line-modes mode-line-misc-info mode-line-end-spaces)) -(setq-default mode-line-format mk/mode-line-format) +(add-hook 'after-init-hook + (lambda () + (unless (memq 'hs-headline mk/mode-line-format) + (setq mk/mode-line-format + (append '("-" hs-headline) mk/mode-line-format))))) (add-hook 'after-init-hook (lambda () - (unless (memq 'hs-headline mode-line-format) - (setq mode-line-format - (append '("-" hs-headline) mode-line-format))))) + (setq-default mode-line-format nil))) (defun mk/toggle-mode-line () (interactive) - (if (eql mode-line-format nil) + (if (eq mode-line-format nil) (setq mode-line-format mk/mode-line-format) - (setq mode-line-format nil))) + (setq mode-line-format nil)) + (force-mode-line-update t)) (keymap-global-set "" 'mk/toggle-mode-line) -(set-face-attribute 'mode-line nil - :box '(:line-width (1 . 8) :style flat-button)) -(set-face-attribute 'mode-line-inactive nil - :box '(:line-width (1 . 8) :style flat-button)) - ;; (set-face-attribute 'mode-line nil -;; :slant 'italic -;; :weight 'bold -;; :background (face-attribute 'default :background) -;; :foreground -;; (cond ((member 'doom-one custom-enabled-themes) "#5B6268") -;; ((member 'doom-nord custom-enabled-themes) "#9099AB") -;; (t (face-attribute 'mode-line-inactive :foreground))) +;; :box '(:line-width (1 . 8) :style flat-button)) +;; (set-face-attribute 'mode-line-inactive nil ;; :box '(:line-width (1 . 8) :style flat-button)) -;; (set-face-attribute 'mode-line-inactive nil -;; :inherit 'mode-line -;; :weight 'normal -;; :box '(:line-width (1 . 8) :style flat-button)) +(set-face-attribute 'mode-line nil + :slant 'italic + :weight 'bold + :background (face-attribute 'default :background) + :foreground + (cond ((member 'doom-one custom-enabled-themes) "#5B6268") + ((member 'doom-nord custom-enabled-themes) "#9099AB") + (t (face-attribute 'mode-line-inactive :foreground))) + :box '(:line-width (1 . 8) :style flat-button)) + +(set-face-attribute 'mode-line-inactive nil + :inherit 'mode-line + :weight 'normal + :background (face-attribute 'default :background) + :box '(:line-width (1 . 8) :style flat-button)) (use-package tab-bar :bind (("C-M-[" . tab-bar-switch-to-prev-tab)