mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-23 11:09:54 +00:00
Improve pdf mode-line.
This commit is contained in:
parent
958756996a
commit
2818d7faa3
2 changed files with 4 additions and 7 deletions
|
@ -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)
|
||||
|
||||
|
||||
;;
|
||||
|
|
|
@ -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))))
|
||||
|
|
Loading…
Reference in a new issue