rougier / nano-modeline

GNU Emacs / N Λ N O Modeline
GNU General Public License v3.0
175 stars 31 forks source link

Modeline does not utilize global-mode-string #7

Closed ReilySiegel closed 1 year ago

ReilySiegel commented 3 years ago

Currently, the modeline does not include global-mode-string. Is this intentional? This causes issues with minor modes that utilize the global-mode-string, such as display-time-mode and display-battery-mode. These modes specifically are useful for those running EXWM.

rougier commented 3 years ago

More or less, I'm not familiar with global-mode-string. It could be appended to the primary part. Do you have some screenshots on what looks like when in use?

ReilySiegel commented 3 years ago

I would actually recommend appending it to the secondary part. Here is a screenshot of my current modeline (using doom-modeline). The time and battery level are provided by the global-mode-string.

2021-10-08-152754_1476x59_scrot

rougier commented 3 years ago

Maybe I could add an option on whether or not to include the global mode string in the secondary part. What do you think?

ReilySiegel commented 2 years ago

Sorry for the late reply. I think this would be a gread solution to the problem, but depending on how many modes use the global-mode-string, this could get quite crowded. I think a sensible option is to have an option (perhaps called something like nano-modeline-secondary-part-ext which when set to nil uses the default secondary part, when set to t uses global-mode-string, and can also be set to any string in the format of global-mode-string, allowing users to exclude specific parts if they so choose. However, doing this greatly increases the complexity of the package, which is counter to the design goals.

rougier commented 2 years ago

My turn to be sorry for late reply. having somehing like nano-modeline-use-global-mode-string does not seems over complex to me. Would you like to make a PR ?

ReilySiegel commented 2 years ago

"Nicolas P. Rougier" @.***> writes:

My turn to be sorry for late reply.

No worries!

having somehing like nano-modeline-use-global-mode-string does not seems over complex to me. Would you like to male a PR ?

I can certainly make a PR, however I don't currently have a lot of free time, so I can't guarantee how quickly that will come in. I'll put it on my to-do list, and hopefully no one beats me to it!

rougier commented 2 years ago

No problem, if we both continue to answer each other very late, we should converge in January 2022 :)

SalTor commented 2 years ago

After looking at the codebase it seems to me this was an abandoned effort. I have seen that a next big version of nano-modeline is in the works, would this change happen to be included in that batch of work?

rougier commented 2 years ago

The big change has been merged but I forgot about this issue... Would you like to try to make a PR? Note that we need to decide if each mode decides to use global mode string or not or if this is a global option.