mirror of
https://github.com/vale981/doom-modeline
synced 2025-03-05 09:21:38 -05:00
parent
d7f187efc6
commit
e27473dd23
1 changed files with 14 additions and 14 deletions
|
@ -225,20 +225,6 @@
|
||||||
;; Buffer information
|
;; Buffer information
|
||||||
;;
|
;;
|
||||||
|
|
||||||
(doom-modeline-def-segment buffer-default-directory
|
|
||||||
"Displays `default-directory'. This is for special buffers like the scratch
|
|
||||||
buffer where knowing the current project directory is important."
|
|
||||||
(let* ((active (doom-modeline--active))
|
|
||||||
(face (if active 'doom-modeline-buffer-path 'mode-line-inactive)))
|
|
||||||
(concat (doom-modeline-spc)
|
|
||||||
(and doom-modeline-major-mode-icon
|
|
||||||
(concat (doom-modeline-icon
|
|
||||||
'octicon "file-directory" "🖿" ""
|
|
||||||
:face face :v-adjust -0.05 :height 1.25)
|
|
||||||
(doom-modeline-vspc)))
|
|
||||||
(propertize (abbreviate-file-name default-directory) 'face face))))
|
|
||||||
|
|
||||||
;;
|
|
||||||
(defvar-local doom-modeline--buffer-file-icon nil)
|
(defvar-local doom-modeline--buffer-file-icon nil)
|
||||||
(defun doom-modeline-update-buffer-file-icon (&rest _)
|
(defun doom-modeline-update-buffer-file-icon (&rest _)
|
||||||
"Update file icon in mode-line."
|
"Update file icon in mode-line."
|
||||||
|
@ -421,6 +407,20 @@ directory, the file name, and its state (modified, read-only or non-existent)."
|
||||||
mouse-1: Previous buffer\nmouse-3: Next buffer"
|
mouse-1: Previous buffer\nmouse-3: Next buffer"
|
||||||
'local-map mode-line-buffer-identification-keymap)))
|
'local-map mode-line-buffer-identification-keymap)))
|
||||||
|
|
||||||
|
(doom-modeline-def-segment buffer-default-directory
|
||||||
|
"Displays `default-directory'. This is for special buffers like the scratch
|
||||||
|
buffer where knowing the current project directory is important."
|
||||||
|
(let* ((active (doom-modeline--active))
|
||||||
|
(face (if active 'doom-modeline-buffer-path 'mode-line-inactive)))
|
||||||
|
(concat (doom-modeline-spc)
|
||||||
|
(doom-modeline--buffer-state-icon)
|
||||||
|
(and doom-modeline-major-mode-icon
|
||||||
|
(concat (doom-modeline-icon
|
||||||
|
'octicon "file-directory" "🖿" ""
|
||||||
|
:face face :v-adjust -0.05 :height 1.25)
|
||||||
|
(doom-modeline-vspc)))
|
||||||
|
(propertize (abbreviate-file-name default-directory) 'face face))))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; Encoding
|
;; Encoding
|
||||||
|
|
Loading…
Add table
Reference in a new issue