Hi, lately I've been looking into various mode-line customization packages such as Smart Mode Line, Powerline, Spaceline, or Telephone Line. I'd like to write a package that works alongside one of the existing mode-line packages but modifies the faces it uses to render the modeline so that it blends in with the currently-enabled Custom Theme. The problem is, I'm unsure of which mode-line package to write my camouflage package for, mostly because I don't know which package best supports what I'm trying to do. I'm currently working on informing myself further, but I thought it couldn't ask to ask around a bit. (Sorry if this isn't the correct place to ask.) Which mode-line package(s) would best suit my project?
Further explanation of what I'm trying to do:
I got the idea when I decided to try out a mode-line package. I decided to try Smart-Mode-Line first. One thing I have noticed about these packages (and about package faces in general**) is that in general, they do not integrate well with Emacs themes; when they attempt to, they sometimes result in illegible mode-line text. I am aiming to write a special theming package (not merely another Custom Theme!) to use with one of the mode-line packages that will enable it to camouflage and blend in better with an Emacs theme, rather than having to enable a separate Custom Theme on top of the actual enabled theme (which doesn't always work well).
My theming package will aim to do the following:
- Map the faces that the package uses for rendering the mode-line to faces that are usually defined in Custom Theme packages (the mode-line faces, and the error faces, the stdout faces, comment faces, tooltip faces, etc).
- I would also like to provide an interface (via Custom) for choosing which faces each mode-line face will inherit from. I have written a special "inherit-feature" function that allows specifying which features to inherit.
- Enhance readability by automatically enhancing color contrast (using a function or two from shr.el, with some tweaks)
- Further ensure readability by providing a way to fine-tune the results via a darkening/lightening coefficient for each of the colors used in the mode-line.
- Allow users to specify face mappings for each Custom Theme (eg, "Use the Comment face foreground color as the ISearch mode-line background color when I'm using the Subatomic theme, but use the Helm-completion face instead when I'm using the Dracula theme.") that will be automatically used when a theme for which such specifications have been made is enabled. (At present, I assume that only one Custom Theme is enabled at a time. Subject to change.) Naturally, this means that the package should ideally be able to detect or check for face changes more than just when it is loaded.
- I've noticed that with Vim Powerline, the mode-line (or whatever they call it) changes content and color contextually. I am more than willing to try to either implement this functionality as a supplement to an existing mode-line package; however, if it would involve a full fork and/or rewrite, I'll have to shelve this project for when I have more time to work on it. This pretty much necessitates that the package be able to detect or check for face changes more than just when it is loaded, as well as provide a means to specify additional faces based on content type and, if at all possible, trigger certain changes with hook-run functions (rather than an idle timer).
Additional and background information
I don't care too much about how many different kinds of separators there are (as long as the options include "arrow" and "none") but I do care about how the package handles window width***, truncation, and position of segments; I don't care if you can add custom sections with arbitrary fixed text, but I'd definitely like to be able to specify position/alignment and spacing for things like buffer name, major mode name, minor mode lists, line/column position, file size, read-only-mode-ness, buffer modification, VCS integration, and EOL.
So far, I like Powerline (despite the fact that it only uses a handful of face variables), but I'm not sure exactly how it differs from Spaceline and telephone-line yet. I'm still in the process of looking at the source code and trying to determine if I can write a theme for it that provides not only for more than that handful of faces (and add some context-specific ones!), or if a fork would be necessary to do so. telephone-line is much better documented, and offers more user-accessible faces, but I'm not sure how robust its alignment and truncation is.
** I've noticed that while most packages try to have their faces inherit from built-in faces with similar functions (which Custom Theme designers are likely to include specifications for in their themes), but some unfortunately do not.
*** I recently attempted to write a function that would update SML's min and max buffer-/file-name-width when the window (NOT just frame) changed size. However, it seems that it only checks the value of the min-width (which also specifies max-width if it's a
( . ) pair) once (on init). I would also have liked to be able to use my own name truncation function.