Coder Social home page Coder Social logo

Comments (6)

seagle0128 avatar seagle0128 commented on July 17, 2024

This segment is matches for searching and replacing including isearch, iedit, anzu and evil-anzu. If you don't need it, you can add this to your config after loading doom-modeline.

(doom-modeline-def-modeline main
     (workspace-number window-number bar matches " " buffer-info buffer-position  " " selection-info)
     (global buffer-encoding major-mode vcs flycheck))

from doom-modeline.

seagle0128 avatar seagle0128 commented on July 17, 2024

@c0001 if there is no issue, I will close it. Please feel free to reopen if you still have question.

from doom-modeline.

c0001 avatar c0001 commented on July 17, 2024

Sorry for fiew days lagging for replying for the terrible wall break 😄 :

Thanks for give's me the key prompt for looking round of this issue.

The mainly assumed by me was wrong, that this is not the problem about evil-panel, it's the problem
about modeline bar.

This is my hacking:

  • First was remove the bar modeline enable from all doom-modeline type
(doom-modeline-def-modeline main
                            (workspace-number window-number  matches " " buffer-info buffer-position  " " selection-info)
                            (global buffer-encoding major-mode vcs flycheck))

(doom-modeline-def-modeline minimal
                            (workspace-number  matches " " buffer-info)
                            (media-info major-mode))

(doom-modeline-def-modeline special
                            (workspace-number window-number  matches " " buffer-info-simple buffer-position " " selection-info)
                            (global buffer-encoding major-mode flycheck))

(doom-modeline-def-modeline project
                            (workspace-number window-number  buffer-default-directory)
                            (global major-mode))

(doom-modeline-def-modeline media
                            (workspace-number window-number  " %b  ")
                            (global media-info major-mode))

But when I saw the nature of this problem I found that actually I just want it be the same color with eyebrowse-workspace color, thus the following hacking was simple for approach this:

    (set-face-attribute 'doom-modeline-eyebrowse nil :inherit highlight)
    
    ;; eyebrowse workspace face was inherit from hightlight which was the same one defface in doom-modeline-bar so that this setting will make bar and eyebrowse workspace modeline segment'sbackground merging into the same block visual.

And going on for the hacking , I prefer to using my own face for above thing , then the hacking like this was nice for me:

(use-package doom-modeline
    :load-path "your path for forked of doom-modline"
    :hook (after-init . doom-modeline-init)
    :config
    (use-package eldoc-eval
      :init (setq eldoc-eval-preferred-function 'eval-expression))

    (setq doom-modeline-buffer-file-name-style 'file-name)

    (defface doom-modeline-eyebrowse-dirived '((t ()))
      "The face used for eyebrowse dirived workspace.")

    (set-face-attribute 'doom-modeline-eyebrowse-dirived nil
                        :background "#deaa00" :foreground "purple4" :bold t)
    
    (doom-modeline-def-segment workspace-number
      "The current workspace name or number. Requires
`eyebrowse-mode' to be enabled."
      (if (and (bound-and-true-p eyebrowse-mode)
               (< 0 (length (eyebrowse--get 'window-configs))))
          (let* ((num (eyebrowse--get 'current-slot))
                 (tag (when num (nth 2 (assoc num (eyebrowse--get 'window-configs)))))
                 (str (if (and tag (< 0 (length tag)))
                          (concat (int-to-string num) ":" tag)
                        (when num (int-to-string num)))))
            (propertize (format " %s " str)
                        'face (if (string-match-p "\\.[[:digit:]]" str)
                                  'doom-modeline-eyebrowse-dirived
                                'doom-modeline-eyebrowse)))
        ""))
    (set-face-attribute 'doom-modeline-eyebrowse nil
                        :background "black" :foreground "yellow" :bold t)
    (set-face-attribute 'doom-modeline-bar nil :background "black")
    (doom-modeline-refresh-bars))

Above hacking is about that:

  • resetting the eyebrowse-tag segment bg and fg color
  • resetting the bar segment color be same eyebrowse tag.
  • let eyebrowse tag segment also show the slot number either with the tag name.
  • changing eyebrowse workspace segment when swithing to the special workspace.

The illustrator for review like be:
doom-line hacking

from doom-modeline.

seagle0128 avatar seagle0128 commented on July 17, 2024

Good to know you address the issue with customizing the doom-modeline.

from doom-modeline.

c0001 avatar c0001 commented on July 17, 2024

Thanks for your contribution of both of your centaur-emacs and this doom-modeline.

For general view, my emacs config was 99% dirived from your centaur-emacs , because of that is pure and laconical for emacs newbie as me. From the learning process with your emacs config, promoting my knowledge-base about how to build my own simple sets of config for daily using.

Fiew moths ago, I was drooled over the modern and laconical visual style of doom-emacs, especially for it's modeline visualization for a long time and hope that gods (DALAO) to extract it and let it be the open interface in melpa. And you did it 🌞 ! Nice 💯

from doom-modeline.

seagle0128 avatar seagle0128 commented on July 17, 2024

@c0001 Glad you like and benefit from them 😄

from doom-modeline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.