mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-20 16:11:07 -05:00
tools/pdf: recognize modeline and doom-modeline
This commit is contained in:
@@ -4,16 +4,16 @@
|
||||
"Current and total page indicator for PDF documents."
|
||||
(format "P %d/%d" (pdf-view-current-page) (pdf-cache-number-of-pages)))
|
||||
|
||||
(if (featurep! :ui doom-modeline +new)
|
||||
(if (featurep! :ui modeline)
|
||||
(def-modeline-format! '+pdf
|
||||
'(+mode-line-bar " " +mode-line-buffer-id " " +pdf-pages)
|
||||
'(+mode-line-major-mode +mode-line-vcs))
|
||||
(def-modeline! '+pdf
|
||||
'(bar matches " " buffer-info +pdf-pages)
|
||||
'(bar matches " " buffer-info " " +pdf-pages)
|
||||
'(major-mode vcs)))
|
||||
|
||||
(defun +pdf|init-modeline ()
|
||||
(funcall (if (featurep! :ui doom-modeline +new)
|
||||
(funcall (if (featurep! :ui modeline)
|
||||
#'set-modeline!
|
||||
#'doom-set-modeline)
|
||||
'+pdf))
|
||||
|
Reference in New Issue
Block a user