TheBB / spaceline

Powerline theme from Spacemacs
GNU General Public License v3.0
539 stars 60 forks source link

providing a function that inserts a segment into the modeling #177

Closed casouri closed 6 years ago

casouri commented 6 years ago

Right now if I want to modify the modeline, I need to either use spaceline-spacemacs-theme and have my segments in the far right or write a custom modeline theme with hard coded segments.

Could there be a function that allows you to insert a segment into anywhere in the modeline?

deb0ch commented 6 years ago

Seen how it's built, I can't see any elegant way of implementing this. The best way of doing such is to define the modeline yourself.

As a base, you can copy / paste the existing spaceline definition (spaceline-spacemacs-theme in spaceline-config.el) and modify it to your desire.

Another way of doing this is providing the extra segments as an argument to spaceline-spacemacs-theme (if I recall correctly, or something along those lines).

casouri commented 6 years ago

Ok. I just want to see if there's any easier way :P

Thanks ( ")b

deb0ch commented 6 years ago

There is a lot of segments that only appear conditionally, so you don't even see where you would like to insert it, and even if you had all the non-displayed segments in mind I don't even know how you would express to such a function where it is that you want your segment inserted.

But there is a space reserved for custom extra segments, you just can't choose where they will be displayed but you can give extra segments as an argument to spaceline-spacemacs-theme.

deb0ch commented 6 years ago

don't know if I'm clear

casouri commented 6 years ago

Yeah I will modify on top of spaceline-spacemacs-theme so I can have some segment in left and second-left specified in spaceline--theme