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

Support specifying both header-line and mode-line independently #322

Open
evertedsphere opened this issue Mar 28, 2020 · 4 comments
Open
Labels
enhancement New feature or request

Comments

@evertedsphere
Copy link

evertedsphere commented Mar 28, 2020

Describe the solution you'd like

Something like:

(doom-modeline-def-modeline 'my-simple-line
  ... ...)

(doom-modeline-def-headerline 'my-simple-headerline
  ... ...)

(defun setup-custom-doom-lines ()
   (doom-modeline-set-modeline 'my-simple-modeline 'default)
   (doom-modeline-set-headerline 'my-simple-headerline 'default))
(add-hook 'doom-modeline-mode-hook 'setup-custom-doom-lines)

Describe alternatives you've considered

I've tried hacking this in myself, e.g. in Doom Emacs with (package! doom-modeline) (and without the modeline module), I attempted to first make a setup with a headerline and no modeline:

(use-package! doom-modeline
  :config
  (setq doom-modeline-icon nil)

  (doom-modeline-def-modeline
    'evsph/modeline
    `(
      ,(propertize "" 'face 'doom-modeline-urgent)
      buffer-info buffer-position remote-host
      minor-modes major-mode
      process vcs lsp checker))

  (setq-default header-line-format
                (list "%e"
                      '(:eval (doom-modeline-format--evsph/modeline)))))

which kind of works but doesn't react to things like my recording evil macros or generally anything hook-dependent, I guess. I'm very new to Emacs so I'm not sure how to work with advice and such.

Additional context
Add any other context or screenshots about the feature request here.

@seagle0128
Copy link
Owner

doom-modeline is designed for beautifying the mode-line, while not header-line. I don't know what do you want to do exactly? Maybe you can provide some examples.

Well, since the formats of mode-line and header-line are the same, you are definitely able to define the mode-line and set to the header-line, including recording evil macros or something like that. e.g. (setq-default header-line-format (doom-modeline-set-main-modeline)). What you need to do is defining the segment and modeline.

@evertedsphere
Copy link
Author

evertedsphere commented Mar 29, 2020

Here is what I have now:

image

I've put a few static (i.e. not reacting to things like changes of Evil state) segments in my header-line: date, time, and currently playing (using libmpdel).

https://github.com/evertedsphere/.doom.d/blob/255af27839e5af9a34c7c54e757cf444055908ef/config.el#L42

@evertedsphere
Copy link
Author

Basically, I'd like some way for doom-modeline to support beautification of the header-line as well. :)

@seagle0128
Copy link
Owner

matches segment is for searching and anzu, etc.

@seagle0128 seagle0128 added the enhancement New feature or request label Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants