-
-
Notifications
You must be signed in to change notification settings - Fork 396
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-one theme: modeline is blue, really blue #125
Comments
Sorry for the incredibly late reply. Am I right to assume you are an Emacs daemon or terminal user? |
Emacs daemon user, yes. |
Sorry for the late reply. This is a known issue with how Emacs initializes themes in daemon sessions. I talked about it (and a workaround) in #73. Could you give that a try and let me know if it solves your issue? |
Yes it worked for me and I found this forcing method will let the frame blinking for a moment with start new gui with 'emacsclinet -c'. Can you fix it or upgrade this method for perfect be? |
Sorry for the late reply. Unfortunately, if there is a way to avoid the blink, I don't know it. Reloading the theme causes Emacs to redraw, and I'm pretty sure it's unavoidable. However, I have changed the code slightly: (defun doom|init-theme ()
"Set the theme and load the font, in that order."
(load-theme 'doom-one t)
(add-hook 'after-make-frame-functions #'doom|init-theme-in-frame))
(defun doom|init-theme-in-frame (frame)
"Reloads the theme in new daemon or tty frames."
(when (or (daemonp) (not (display-graphic-p)))
(with-selected-frame frame
(doom|init-theme))))
(add-hook 'emacs-startup-hook #'doom|init-theme) Perhaps it will work better for you. |
The key to avoiding the blink is that Try this: (defun doom|init-theme ()
(load-theme 'doom-one t)
(load-theme 'airline-doom-one t))
(defun doom|init-theme-in-frame (frame)
(with-selected-frame frame
(doom|init-theme))
;; Unregister this hook once its run
(remove-hook 'after-make-frame-functions
'doom|init-theme-in-frame))
(if (daemonp)
(add-hook 'after-make-frame-functions
'doom|init-theme-in-frame)
(doom|init-theme)) |
@vodik the problem is how you create that first frame. If you create a terminal frame ( If you can keep to one or the other, your solution works, but if you use them interchangeably, you have issues. Like, for instance, when you run a daemon server which you use gui frames for at home and terminal frames for from abroad (e.g. through ssh). Perhaps a better approach is reload the theme, but only when a new frame type is detected? |
Yeah, I see the ugly blue has returned to my GUI session. |
I like this idea, might not be a bad idea to publish it as its own package. Seems like its a general emacs problem. |
As of 1cdc201, this issue should be resolved. Feel free to reopen this if that isn't the case. |
When I start Emacs with doom-one theme, the modeline is blue. I need to define another theme and choose again doom-one to correct this problem temporarily.
The text was updated successfully, but these errors were encountered: