Skip to content

Commit

Permalink
Show workspace name in doom-modeline
Browse files Browse the repository at this point in the history
Fixes #1047 and #1048
  • Loading branch information
sebastiaanspeck authored and krn-sebastiaan committed Aug 15, 2023
1 parent 8a1d66f commit e403ecd
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/elisp/treemacs-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,13 @@ Will be set by `treemacs--post-command'.")
((memq 'moody-mode-line-buffer-identification
(default-value 'mode-line-format))
'(:eval (moody-tab " Treemacs " 10 'down)))
((and (fboundp 'doom-modeline)
(fboundp 'doom-modeline-def-modeline))
(doom-modeline-def-modeline 'treemacs '(bar " " major-mode) '())
((eval-and-compile (require 'doom-modeline nil 'noerror))
(with-no-warnings
(doom-modeline-def-segment treemacs-workspace-name
"Display treemacs."
(propertize (format " %s " (treemacs-workspace->name (treemacs-current-workspace)))
'face (doom-modeline-face 'doom-modeline-buffer-minor-mode))))
(doom-modeline-def-modeline 'treemacs '(bar " " major-mode) '(treemacs-workspace-name))
(doom-modeline 'treemacs))
(t
'(:eval (format " Treemacs: %s"
Expand Down

0 comments on commit e403ecd

Please sign in to comment.