domtronn / spaceline-all-the-icons.el

A Spaceline Mode Line theme using All The Icons for Emacs
MIT License
234 stars 25 forks source link

pdftools: page-number #113

Open g4v4g4i opened 4 years ago

g4v4g4i commented 4 years ago

Hi, a great feature would be to show the page number in pdftools/pdf-view-mode. I suppose something along the lines of:

   (spaceline-define-segment all-the-icons-position
      "An `all-the-icons' Line & Column indicator"
     (if (eq major-mode 'pdf-view-mode)
      (concat (number-to-string (pdf-view-current-page))
          "/"
          (number-to-string (pdf-cache-number-of-pages)))
      (propertize (format-mode-line "%l:%c")
        'face `(:height ,(spaceline-all-the-icons--height 0.9) :inherit)
        'display '(raise 0.1))
     )
     :tight t
    )

may do. This is similar to how it is handled in the segment line-column in spaceline-segments.el. Best, Christian