PDF Modeline Improvements#425
PDF Modeline Improvements#425tecosaur wants to merge 1 commit intoseagle0128:masterfrom tecosaur:master
Conversation
There are a few changes here to improve the appearance of the PDF modeline: + Prioritise the page information, move segment in front of buffer name + Create (and use) new buffer-name segment, that doesn't include any mode or state information + Left-pad `doom-modeline--pdf-pages' to ensure that for a given PDF it's always the same width + Add a `pdf-icon' segment and place it in front of the buffer name
|
The main issue I have with the default modelling is that with long file names the path segment easily pushes the page number off the edge of the modeline (as seen in my screenshot). IMO this is problematic as the page information is highly desirable, so I moved the segment in front of the buffer info. Now as you move through the pages as you go from 1 to 2 digits etc. the width changes and the rest of the modeline shifts. Lastly, when viewing a file in Does this help clarify the motivation behind these modifications? |
|
Well, |
|
Hmmm, I do see the sense in consistency, I just wonder if it's worth making an exception for paged documents. |
|
Maybe you just need a new modeline for pdf buffers, while not changing so many codes 😄️ (doom-modeline-def-modeline 'my-pdf
'(bar window-number matches pdf-pages buffer-info-simple)
'(misc-info major-mode process vcs)) |
|
Oh but then you get the cascade of "would be better if this was changed" 😅 (mentioned in my earlier commit) ... leading to what you see here. |
|
If the buffer/file name is too long, same issue for other files. It also exists in vanilla Emacs. |
Yea, I'm just of the opinion that you don't tend to care as much about buffer position (in a text file) compared to page number (pdfs).
I just have file-icons off. |
|
Then I suggest to add an option to truncate the file name with while displaying. |
|
This reminds me of #345 😛, regardless I get the impression that with this issue, you'd like to leave things as they currently are and any other layout should be in personal config? If so, I'll close this PR. |
|
yep, I'd like leave it to the private configurations. |
|
Alrighty then, I'll finish the discussion then. As a final note, I would like to re-express my opinion that this PR produces a nicer modelling than the default, but it's not a huge deal 🙂. |
|
For anyone who happens to be come across this and like the look, I've just noticed an omission from my PR: (doom-modeline-def-modeline 'pdf
'(bar window-number matches pdf-pages pdf-icon buffer-name)
'(misc-info major-mode process vcs)) |
|
Try |




There are a few changes here to improve the appearance of the PDF modeline.
mode or state information
doom-modeline--pdf-pagesto ensure that for a given PDFit's always the same width
pdf-iconsegment and place it in front of the buffer name