Distinguish between active/inactive windows
AmaiKinono opened this issue · 3 comments
AmaiKinono commented
Here's my little hack:
(define-advice mini-modeline-enable (:after (&rest _) set-modeline-color)
"Make modelines thin, and set different color for active/inactive ones.
By doing so, we can easily distinguish between active/inactive
windows.
We do nothing for Emacs in terminal. This is because a thin
modeline is impossible in terminal, so we just hide it."
(when (display-graphic-p)
;; `mode-line-format' can't be empty, or modeline will not show.
(setq-default mode-line-format '(" "))
(mapc (lambda (buf)
(unless (string-prefix-p " " (buffer-name buf))
(with-current-buffer buf
(setq mode-line-format " "))))
(buffer-list))
(face-spec-set 'mode-line
'((((background light))
:height 0.14 :box nil
:background "#55ced1")
(t
:height 0.14 :box nil
:background "#008b8b")))
(face-spec-set 'mode-line-inactive
'((((background light))
:height 0.1 :box nil
:background "#dddddd")
(t
:height 0.1 :box nil
:background "#333333")))))
It shows the modeline as a thin bar, and use their height and color to distinguish between active/inactive windows, like this:
I'm not sure if you like it. If you do like it, I can create a PR ;)
kiennq commented
This is awesome. Please create a PR for it.
QiangF commented
It looks better than hiwin!
kiennq commented
This is definitely deserve to be on PR gif 😄