doomemacs icon indicating copy to clipboard operation
doomemacs copied to clipboard

feat(modeline): Add header-line support to +light

Open precompute opened this issue 3 years ago • 4 comments

This adds the +headerline flag, which when used with +light makes use of the header-line instead of the mode-line. Using +headerline also disables the mode-line globally.

This PR "copies" the mode-line onto the header-line, and disables the mode-line when both the +light and +headerline flags are present under :ui modeline.

It involves a :s/mode-line/header-line/g / :s/modeline/headerline/g and then enabling (global-hide-mode-line-mode). It works without any issues for me.

2022-04-01_17:50:00_1920x1080

I figured this out yesterday and since it just worked, I decided to PR it.

I did think about using a variable instead of a flag, but because it was big change that wouldn't apply until the module was reloaded, I decided to go with a flag.

I'm sorry if the commit message is inadeqate / wrong.

I haven't modified the README file for the module (as requested in do-not-pr.md) but I can add a line for the new flag if necessary.

precompute avatar Apr 01 '22 12:04 precompute

Should hide-mode-line-excluded-modes be set to nil when the header-line is active?

precompute avatar Apr 03 '22 14:04 precompute

Any updates on this? I've been using this for months without a hitch now.

precompute avatar Jul 22 '22 09:07 precompute

Hello,

I won't have much time to review it for now, all I can see from this is wondering this: does it work with the few packages that actually want to modify the headerline ? E.g. if you have (after! lsp (setq lsp-headerline-breadcrumb-enable t)), are both the header-line and the breadcrumbs visible ?

gagbo avatar Aug 18 '22 15:08 gagbo

Is this what you meant? This works as-is, doesn't require evaling your snippet.
emacs_headerline

system     Debian GNU/Linux 11 (bullseye) Linux 5.18.0-0.bpo.1-rt-amd64 x86_64
emacs      29.0.50 master 1cdc64cdd ~/.emacs.one/ -> ~/.emacs.one/
doom       3.0.0-dev HEAD -> master 33c5f372 2022-07-09 21:10:40 +0200

precompute avatar Aug 20 '22 05:08 precompute