domtronn / spaceline-all-the-icons.el

A Spaceline Mode Line theme using All The Icons for Emacs
MIT License
235 stars 25 forks source link

Styling only inactive windows #2

Closed mfiano closed 7 years ago

mfiano commented 7 years ago

The included theme is only applying a style to all inactive window modelines. Active window is completely blank.

domtronn commented 7 years ago

Could you please update the package and try again?

The reason it's blank is because one of the spaceline segments is throwing an error... Unfortunately, it's not easy to get output in order to debug this.

If you could have a look inside your *Messages* buffer and paste the output here, that would be useful.

Alternatively, you can toggle off each of the spaceline-all-the-icons segments one at a time until the mode line shows up - This will indicate which segment has the error in.

mfiano commented 7 years ago

Sure, the messages buffer shows:

Loading /home/axion/.emacs.d/config.el (source)...
Loading /home/axion/.emacs.d/custom.el (source)...done
Updating /home/axion/.emacs.d/quelpa/melpa
Loading /home/axion/.emacs.d/etc/recent...done
Turn on counsel-projectile key bindings
Loading /home/axion/.emacs.d/config.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Error during redisplay: (eval (spaceline-ml-all-the-icons)) signaled (wrong-type-argument number-or-marker-p nil) [16 times]
<left-fringe> <drag-mouse-1> is undefined
Error during redisplay: (eval (spaceline-ml-all-the-icons)) signaled (wrong-type-argument number-or-marker-p nil) [47 times]

and here is what I see: example

mfiano commented 7 years ago

@domtronn This error seems to lie in the symbol all-the-icons-package-updates

domtronn commented 7 years ago

Thanks for debugging that! I've just pushed a fix, if you do a pull let me know if this fixes it 😃

In the mean time, I'm going to try and write a debug function which toggles segments on and off waiting for an error and then tells you what segment failed... I feel that would be useful.

mfiano commented 7 years ago

Thanks. By the way, I'm trying to figure out how the faces are defined. I'd like the active ml face to be nearly the same color as the inactive. Also I can't figure out where the items for each are defined...I also want the exact same segments for active and inactive.

domtronn commented 7 years ago

The faces are defined as

Unfortunately, very few themes implement the spaceline-highlight-face so it doesn't always get defined... There's also the spaceline-highlight-face-func which is a variable that you can set in order to return a face to use for the spaceline-highlight, mainly used for changing the colour based on evil-mode.

I've written some glue code which updates colours to my liking for my themes if you're interested.

Lastly, the inactive/active stuff is all defined on a segment by segment basis (see here for example). And I've tried to set a lot of the segments to not show when the buffer is inactive, both to save space and also because I (personally) don't find that information useful...

However, I could add a custom setting to override the active setting if you'd like?