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

doom-mode-line in Centaur emacs failed to change face when emacs-zoom-window is triggered #169

Closed
CsBigDataHub opened this issue Feb 22, 2020 · 2 comments

Comments

@CsBigDataHub
Copy link
Contributor

CsBigDataHub commented Feb 22, 2020

@seagle0128
I have been using emacs-zoom-window with doom-mode-line before moving to centaur emacs.
Usually when we zoom a window , the mode line changes its color to green stating that user is in a zoomed window. This does not happen with Centaur emacs , Is there any configuration need to make this work

Link to emacs-zoom-window - https://github.com/syohex/emacs-zoom-window

code the is resposible to change the face

(defcustom zoom-window-mode-line-color "green"
  "Color of mode-line when zoom-window is enabled"
  :type 'string)

;; This called in zoom-window function
(set-face-background 'mode-line zoom-window-mode-line-color curframe)

mode-line changes color fine if i execute
(set-face-background 'mode-line "blue")
It is just not changing face when zoom-window is used

My zoom window config -

(use-package zoom-window
  :bind ("C-x C-z" . zoom-window-zoom)
  :config
  (custom-set-variables
   '(zoom-window-mode-line-color "blue")
   '(zoom-window-use-persp t))
  (zoom-window-setup))
@CsBigDataHub
Copy link
Contributor Author

CsBigDataHub commented Feb 22, 2020

Update-
It was working for buffers like *scratch* and *dashboard*
It is NOT working with emacs-lisp , org-mode or java-mode buffers. These are the modes I have tested.

@CsBigDataHub CsBigDataHub reopened this Feb 22, 2020
@CsBigDataHub CsBigDataHub changed the title doom-mode line Centaur emacs failed to change face when emacs-zoom-window is triggered doom-mode-line in Centaur emacs failed to change face when emacs-zoom-window is triggered Feb 23, 2020
@seagle0128
Copy link
Owner

seagle0128 commented Feb 23, 2020

zoom-window is incompatible with solaire-mode. Try this:

(use-package zoom-window
  :bind ("C-x C-z" . zoom-window-zoom)
  :custom
  (zoom-window-mode-line-color "DarkGreen")
  (zoom-window-use-persp t)
  :hook (find-file . (lambda () (setq my-solaire-mode solaire-mode)))
  :init
  (zoom-window-setup)
  (defvar-local my-solaire-mode nil)
  (advice-add #'zoom-window-zoom :before #'turn-off-solaire-mode)
  (advice-add #'zoom-window--restore-mode-line-face :after
              (lambda ()
                (if my-solaire-mode
                    (turn-on-solaire-mode)
                  (turn-off-solaire-mode)))))

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

No branches or pull requests

2 participants