Coder Social home page Coder Social logo

God-mode indicator about doom-modeline HOT 5 CLOSED

seagle0128 avatar seagle0128 commented on August 16, 2024
God-mode indicator

from doom-modeline.

Comments (5)

seagle0128 avatar seagle0128 commented on August 16, 2024 1

Okay. Then all are clear. I believe the current implementation is good. Same behavior for roy-modal. Thanks.

from doom-modeline.

seagle0128 avatar seagle0128 commented on August 16, 2024

I am trying to make a similar indicator as evil-state. Since I am not using god-mode, I am not very sure if it meets the requirements. If you have any idea, please let me know. Will commit soon.

from doom-modeline.

mtellezj avatar mtellezj commented on August 16, 2024

Hi, the indicator when you are in God mode is only a minor-mode name, but as doom-modeline hide the minors mode names you can tell for sure. This is how appear on a vanilla modeline:

imagen

From the docs, there is a function to change the cursor when you are in god mode or not:

(defun my-update-cursor ()
  (setq cursor-type (if (or god-local-mode buffer-read-only)
                        'box
                      'bar)))

(add-hook 'god-mode-enabled-hook 'my-update-cursor)
(add-hook 'god-mode-disabled-hook 'my-update-cursor)

but it would be nice having an indicator on doom-modeline. I think you can use this hooks to known when god mode is active or not, and as you are doing with evil mode show a <G> for active and a <I> for inactive (or insert mode). By the way, good job on doom-modeline, I tried several alternatives and this fill my needs. Cheers!

from doom-modeline.

seagle0128 avatar seagle0128 commented on August 16, 2024

Thanks for your suggestion!

You want <G> and <I> like evil-state, right? The hooks look fine. But I am thinking how to remove the indicator if you won't use god-mode? Only two modes for god-mode. So I think <G> is very clear in this situation. If god-mode is disabled, shows nothing.

And another case is using both evil and god. How to handle it? I just show both.
What's your thoughts?

from doom-modeline.

mtellezj avatar mtellezj commented on August 16, 2024

I think that evil and god should not be activate at the same time, because both modes made the same thing but with diferent approach (I'll never activate both at the same time by the way). And, as you said, probably the best thing is not show an indicator at all when god is not active, because if this mode is not active on startup, you have no way to find out (maybe checking minors mode names). Hope this help.

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.