I know you mentioned in the README file about this, but is there a plan to get doom-modeline on its own? I had to pick up too much things from core-ui, core-lib and memoize to make it work stand alone.
It is planned, but I haven't figured out how exactly I want to go about it. My modeline config has many idiosyncrasies I'd like to generalize, but I'll have a look at it next weekend. Think it's about time it happened.
@Townk do you mind sharing your version? I'm trying to disentangle the configuration, but after following the readme, I'm still experiencing bootstrapping issues. Realizing that calls to add-hook! need to be replaced as well since they're defined within the broader Doom ecosystem. But I do not expect this to be the only necessary change.
@wpcarro def-modeline-segment! and def-modeline! calls too (both defined in core/core-ui.el). Looks like the readme needs more work. In any case, another user, torgeir, managed to extract my modeline: https://github.com/torgeir/.emacs.d/blob/1f2c1894655053a680bfd8b9441062c1c3f6b525/site-lisp/t-doom-modeline/t-doom-modeline.el. Perhaps that can be of help?
Thanks for the reference, @hlissner. I am enjoying your work quite a bit, so I hope your energy and dedication remains high. One question I've had as I've been reading some of doom's source is the function-name! notation. Is the ! intended to denote a macro? I'm a lisp novice, so forgive my ignorance if this is a well known convention.
@wpcarro I'm glad you like it; I expect to be working on it for a very long time!
Is the
!intended to denote a macro?
It indeed denotes a macro, but it is not a standard Lisp or Elisp convention.
I list all the naming conventions I use in Doom at the top of core/core.el and what they mean. Only the first two are Lisp conventions, the rest are my own.
Seconded! I updated with the latest stuff just yesterday. Had to byte compile it to get rid of some wierd (void-function dir-path) and (void-function file-path) errors from these lines, but other than that its been working great for me for a long time.
I vote this proposal. Eager to get doom-modeline on mepla.
Suggest to make it light and fast.
This issue has been raised over one year ago. I am implementing myself on https://github.com/seagle0128/doom-modeline. Will submit to mepla once it's ready.
Already submitted on https://github.com/melpa/melpa/pull/5550.
@seagle0128 Thank you for this! Sorry for never getting around to it. Once I've merged develop here, I'll be happy to help you out.
A few things I've noticed: you've copied a lot of code verbatim from Doom. I have no problem with that, but I suspect the folks at MELPA will have issue with the naming conventions. Also, I notice you are using the Doom modeline from the master branch. I'd highly recommend using the one on develop instead. Many bugs have been fixed.
@hlissner , Thanks for the comments! I will refactor and update the codes from develop branch later. It just works for now and need a lot of work to do, I think. You help should be great!
I updated doom-modeline following by @hlissner 's suggestion. All names of function and vars are renamed as MELPA conventions. And I am porting develop branch to doom-modeline.
Waiting for MELPA's approval or feedback...
While I am porting new codes from develop branch, I found some issues.
(require 'map) which means requires emacs 25+. I'd like support 24.4+, how to port? [Fixed]face is nil in +doom-modeline--make-xpm?vcs status not changed after switching the branch. [Fixed]@hlissner, Could you please help to check these issue? The codes are here.
vcs status not changed after switching the branch
My solutions is https://github.com/seagle0128/doom-modeline/commit/10ec55adcc69a08cbc3df814280f5e47f5f043c3:
(declare-function magit-toplevel "magit-git")
(defun doom-modeline-magit-post-refresh ()
"Update vcs state in mode-line after refreshing in magit."
(dolist (buf (buffer-list))
(when (and (not (buffer-modified-p buf))
(buffer-file-name buf)
(file-exists-p (buffer-file-name buf))
(file-in-directory-p (buffer-file-name buf) (magit-toplevel)))
(with-current-buffer buf
(vc-refresh-state)
(doom-modeline--update-vcs)))))
(add-hook 'magit-post-refresh-hook #'doom-modeline-magit-post-refresh)
The PR https://github.com/melpa/melpa/pull/5550 has been merged.
doom-modeline is available on MEPLA now.
This issue can be closed, I think.
And it works like a charm! 馃憦
I just released v0.8.1 of doom-modeline package.
I rewrote doom-modeline--buffer-file-name and added 3 new styles:
Given ~/Projects/FOSS/emacs/lisp/comint.el
truncate-from-project => ~/Projects/FOSS/emacs/l/comint.el
truncate-with-project => emacs/l/comint.el
truncate-except-project => ~/P/F/emacs/l/comint.el
The default style is still truncate-upto-project.
In my testing, at least 5x faster than original one.
It's really deserved to try!
Most helpful comment
I vote this proposal. Eager to get
doom-modelineon mepla.Suggest to make it light and fast.