General cleanup + refactor
This commit is contained in:
parent
a94a591072
commit
e57ba47c5a
2 changed files with 5 additions and 5 deletions
|
@ -180,8 +180,7 @@ active."
|
|||
;; Show version string for multi-version managers like rvm, rbenv, pyenv, etc.
|
||||
(defvar-local +doom-modeline-env-version nil)
|
||||
(defvar-local +doom-modeline-env-command nil)
|
||||
(add-hook 'focus-in-hook #'+doom-modeline|update-env)
|
||||
(add-hook 'find-file-hook #'+doom-modeline|update-env)
|
||||
(add-hook! '(focus-in-hook find-file-hook) #'+doom-modeline|update-env)
|
||||
(defun +doom-modeline|update-env ()
|
||||
(when +doom-modeline-env-command
|
||||
(let* ((default-directory (doom-project-root))
|
||||
|
@ -192,7 +191,7 @@ active."
|
|||
|
||||
;; Only support python and ruby for now
|
||||
(add-hook! 'python-mode-hook (setq +doom-modeline-env-command "python --version 2>&1 | cut -d' ' -f2"))
|
||||
(add-hook! 'ruby-mode-hook (setq +doom-modeline-env-command "ruby --version 2>&1 | cut -d' ' -f2"))
|
||||
(add-hook! 'ruby-mode-hook (setq +doom-modeline-env-command "ruby --version 2>&1 | cut -d' ' -f2"))
|
||||
|
||||
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue