rougier / nano-modeline

GNU Emacs / N Λ N O Modeline
GNU General Public License v3.0
175 stars 31 forks source link

available width works with :box #19

Closed hans-d closed 2 years ago

hans-d commented 2 years ago

Together with #18, and using :box (:line-width -8 :color ,nano-dark-background) this allows for a small gap between the modeline and the body of the text. Eg when using org mode with a lot of SRC blocks it is more distinct.

hans-d commented 2 years ago

in progress: https://www.gnu.org/software/emacs/manual/html_node/emacs/Copyright-Assignment.html

rougier commented 2 years ago

I've rewrote the main function for rendering the headher line but I haven't pushed yet. I'll first commit my changes and then I will integrate your PR If it's still relevant.

hans-d commented 2 years ago

still relevant, updated code against latest master

rougier commented 2 years ago

Sorry, Im' late. Coudl you post a screenshot before / after?

hans-d commented 2 years ago

before:

Screenshot 2022-01-03 at 19 36 05

after: image

Together with #18 and something like

  (defun my/nano-modeline--clearance-tweaks ()
    (seq-do (lambda(elt)
              (set-face-attribute elt nil
                        :box `(:line-width -8 :color ,nano-dark-background)))
            (seq-filter (lambda(elt)
                          (string-prefix-p "nano-modeline-" (symbol-name elt)))
                        (face-list))))

will make it clear the available width calculation is off

hans-d commented 2 years ago

combination of fixes and local customization:

image

rougier commented 2 years ago

Now I get it and I realized I never understood negative linewidth boxed before. Can you rebase your PR?

hans-d commented 2 years ago

rebased

rougier commented 2 years ago

Merged. I've pushed some small adjustments as well.