diff --git a/doom-modeline-segments.el b/doom-modeline-segments.el index 6a3fe7f..98e585e 100644 --- a/doom-modeline-segments.el +++ b/doom-modeline-segments.el @@ -1884,15 +1884,12 @@ mouse-1: Toggle Debug on Quit" (format " P%d/%d " (eval `(pdf-view-current-page)) (pdf-cache-number-of-pages)) - 'face (if (doom-modeline--active) - 'mode-line - 'mode-line-inactive)))) + 'face (if (doom-modeline--active) 'mode-line 'mode-line-inactive)))) (add-hook 'pdf-view-change-page-hook #'doom-modeline-update-pdf-pages) (doom-modeline-def-segment pdf-pages "Display PDF pages." - (when (eq major-mode 'pdf-view-mode) - doom-modeline--pdf-pages)) + doom-modeline--pdf-pages) ;; diff --git a/doom-modeline.el b/doom-modeline.el index dd155e9..2bca677 100644 --- a/doom-modeline.el +++ b/doom-modeline.el @@ -208,7 +208,7 @@ If DEFAULT is non-nil, set the default mode-line for all buffers." (add-hook 'dashboard-mode-hook #'doom-modeline-set-project-modeline) (add-hook 'image-mode-hook #'doom-modeline-set-media-modeline) (add-hook 'circe-mode-hook #'doom-modeline-set-special-modeline) - (add-hook 'pdf-tools-enabled-hook #'doom-modeline-set-pdf-modeline) + (add-hook 'pdf-view-mode-hook #'doom-modeline-set-pdf-modeline) (add-hook 'paradox-menu-mode-hook #'doom-modeline-set-package-modeline) ;; Add advice (advice-add #'helm-display-mode-line :override #'doom-modeline-set-helm-modeline)) @@ -221,7 +221,7 @@ If DEFAULT is non-nil, set the default mode-line for all buffers." (remove-hook 'dashboard-mode-hook #'doom-modeline-set-project-modeline) (remove-hook 'image-mode-hook #'doom-modeline-set-media-modeline) (remove-hook 'circe-mode-hook #'doom-modeline-set-special-modeline) - (remove-hook 'pdf-tools-enabled-hook #'doom-modeline-set-pdf-modeline) + (remove-hook 'pdf-view-mode-hook #'doom-modeline-set-pdf-modeline) (remove-hook 'paradox-menu-mode-hook #'doom-modeline-set-package-modeline) ;; Remove advices (advice-remove #'helm-display-mode-line #'doom-modeline-set-helm-modeline))))