Zen/Writeroom modeline

When turning on zen-mode SPC t z the modeline disappears.
But I like the modeline, and I would like it to be shown in zen-mode. The only workaround I have found to make it appear while in zen-mode is to disable doom-modeline-mode and then re-enable it.

Is there a way to have it always enabled when switching to zen-mode?

1 Like

You could try something like this in your config.el:

(add-hook 'zen-mode-hook #'doom-modeline-mode)


Have you tired olivetti-mode

it has a similar effect to make the writing distraction-free, nice and center.

Unfortunately it the modeline does not appear when switching to zen-mode.

I have tried olivetti-mode. But it has other little things I don’t like.

zen-mode probably enables hide-mode-line-mode. You can check using SPC h v hide-mode-line-mode RET. If so

(add-hook 'zen-mode-hook (defun my-show-mode-line () (hide-mode-line-mode -1)))

If that doesn’t work you can look at the definition of zen-mode using SPC h f and see what it is doing to hide the modeline and then counteract that.

It looks like it is defined in writeroom-mode.el This is what I found:

(defvar writeroom--mode-line-showing nil
  "Flag indicating whether the original mode line is displayed.")
(make-variable-buffer-local 'writeroom--mode-line-showing)

I tried a few things, but I really don’t know how to counteract this.

I had the wrong mode earlier. Try:

(add-hook 'writeroom-mode-hook #'doom-modeline-mode)

Thank you. That Works perfectly.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.