hlissner/emacs-solaire-mode

mini-modeline support

andreyorst opened this issue · 4 comments

From doomemacs/themes#605

I'm using mini-modeline package, that displays modeline in the minibuffer.

In the source code of this package it adds this hook to the minibuffer setup process:

(defun mini-modeline--set-buffer-face ()
  "Set buffer default face for current buffer."
  (setq mini-modeline--face-cookie
        (face-remap-add-relative 'default mini-modeline-face-attr)))

Which effectively colors minibuffer in the color of the modeline as shown here:

image

However some themes don't set correct color for the fringes, which result in gaps at the sides of the minibuffer. It would be nice if solaire mode could handle this case.

Solaire Mode commit: 56f6d9e
DOOM Themes commit: 0edc4d2
Emacs version: GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.29, cairo version 1.17.4) of 2021-05-30

Give this a try (solaire-global-mode must be loaded/enabled before mini-modeline-mode):

(defun fix-mini-modeline--set-buffer-face (&rest _)
  (push (face-remap-add-relative 'fringe mini-modeline-face-attr)
        solaire-mode--remaps))
(advice-add #'mini-modeline--set-buffer-face :after #'fix-mini-modeline--set-buffer-face)

Yes, this seems to work!

As of 56db821 I've added mini-modeline support to the package proper. Let me know if that isn't the case and I'll reopen it. Thanks for bringing it to my attention!

Seems to work fine without the advice you've mentioned before. Thanks a lot!