Add project segment
This commit is contained in:
parent
fdaeb1fddb
commit
e0f6ba27a8
16
mood-line.el
16
mood-line.el
@ -220,6 +220,7 @@ An optional key :padding may be provided, the value of which will be used as
|
||||
((or (mood-line-segment-buffer-status)
|
||||
(mood-line-segment-client)
|
||||
" ") . " ")
|
||||
((mood-line-segment-project) . "/")
|
||||
((mood-line-segment-buffer-name) . " ")
|
||||
((mood-line-segment-anzu) . " ")
|
||||
((mood-line-segment-multiple-cursors) . " ")
|
||||
@ -526,6 +527,21 @@ Modal editing modes checked, in order:
|
||||
(propertize (mood-line--get-glyph :frame-client)
|
||||
'face 'mood-line-frame-status-client)))
|
||||
|
||||
;; -------------------------------------------------------------------------- ;;
|
||||
;;
|
||||
;; Project segment
|
||||
;;
|
||||
;; -------------------------------------------------------------------------- ;;
|
||||
|
||||
(defun mood-line-segment-project ()
|
||||
"Return project name from project.el or Projectile, if any."
|
||||
(or
|
||||
(and (fboundp 'project-name)
|
||||
(project-current)
|
||||
(project-name (project-current)))
|
||||
(and (fboundp 'projectile-project-name)
|
||||
(projectile-project-name))))
|
||||
|
||||
;; -------------------------------------------------------------------------- ;;
|
||||
;;
|
||||
;; anzu segment
|
||||
|
Loading…
Reference in New Issue
Block a user