Untitled

mail@pastecode.io avatar
unknown
lisp
2 years ago
2.3 kB
5
Indexable
Never
  (use-package doom-modeline
	:init
	(doom-modeline-mode 1)
	:custom
    (doom-modeline-height 20)
    (doom-modeline-bar-width 0)
    (doom-modeline-enable-word-count t)
    (doom-modeline-buffer-file-name-style 'truncate-upto-root)
    (doom-modeline-env-version nil)
	(inhibit-compacting-font-caches t)
    (lsp-modeline-diagnostics-enable nil)
    (all-the-icons-scale-factor 1)
    (all-the-icons-default-adjust 0.2)
    (doom-modeline-major-mode-color-icon nil)
    :config
    (set-face-attribute 'mode-line nil :family "Hack" :height 93)
    (set-face-attribute 'mode-line-inactive nil :family "Hack" :height 93)
    (setq doom-modeline--buffer-file-icon
          (when (and (display-graphic-p)
                     doom-modeline-icon
                     doom-modeline-major-mode-icon)
            (let ((icon (all-the-icons-icon-for-buffer)))
              (propertize (if (or (null icon) (symbolp icon))
                              (doom-modeline-icon 'faicon "file-o" nil nil
                                                  :face 'all-the-icons-dsilver
                                                  :height 0.9
                                                :v-(and )djust 0.0)
                            icon)
                          'help-echo (format "Major-mode: %s" (format-mode-line mode-name))
                          'display '(raise 0))))))

;;codigo en doom-modline-segments
(defvar-local doom-modeline--buffer-file-icon nil)
(defun doom-modeline-update-buffer-file-icon (&rest _)
  "Update file icon in mode-line."
  (setq doom-modeline--buffer-file-icon
        (when (and (display-graphic-p)
                   doom-modeline-icon
                   doom-modeline-major-mode-icon)
          (let ((icon (all-the-icons-icon-for-buffer)))
            (propertize (if (or (null icon) (symbolp icon))
                            (doom-modeline-icon 'faicon "file-o" nil nil
                                                :face 'all-the-icons-dsilver
                                                :height 0.9
                                                :v-adjust 0.0)
                          icon)
                        'help-echo (format "Major-mode: %s" (format-mode-line mode-name))
                        'display '(raise -0.135))))))