Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: configuration flag to turn off modeline modification #38

Open
indigoviolet opened this issue Jul 13, 2022 · 5 comments

Comments

@indigoviolet
Copy link

I would like to manage how popup modelines look, but there is some interaction between popper setting it and my own hooks, such that popper restores it to the earlier configuration (ie reverse the effect of my hook).

@karthink
Copy link
Owner

@indigoviolet Can you provide a little more detail about what you're trying to do? Does your mode-line for a popup buffer have a buffer-local value, and does setting popper-mode-line to "" help?

@indigoviolet
Copy link
Author

I'm using https://github.com/seagle0128/doom-modeline to manage my modeline.

I have defined a custom segment that indicates when my vterm buffers are in vterm-copy-mode.

I also have a custom modeline format for vterms, which gets turned on with vterm-mode-hook via doom-modeline-set-modeline, which sets mode-line-format as buffer-local.

AFAICT, the problem is that if I also treat vterm buffers as popper popups, popper will attempt to set mode-line-format for all popups, and it uses the default value for mode-line-format, which overrides my buffer-local value.

This appears to happen even if I set popper-mode-line to "".

The solution I was hoping for was to turn off popper's modeline modifications altogether, and define a doom-modeline segment for popper as well.

@karthink
Copy link
Owner

karthink commented Jul 26, 2022 via email

@indigoviolet
Copy link
Author

Thank you! This fix appears to do the trick - it no longer overwrites the local mode line, and I'm happy with this.

For your consideration: it might still be a good idea to provide a flag to turn off mode-line modification (setting popper-mode-line to nil disables the mode-line in popups) altogether - that way I can consolidate how the mode line is constructed in one place (by defining a doom-modeline popper segment) instead of having packages write to it -- declarative vs imperative, in some sense.

@karthink
Copy link
Owner

Thank you! This fix appears to do the trick - it no longer overwrites the local mode line, and I'm happy with this.

It works, but I'm seeing multiple popup indicators (sometimes):
2022-08-19-183244_339x44_scrot

I'll add a customization option to leave the modeline alone after fixing this bug soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants