mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-24 03:00:10 +00:00
Merge pull request #18 from r0m4n27/master
Add variable for the python-version
This commit is contained in:
commit
70b1dd3901
1 changed files with 5 additions and 2 deletions
|
@ -90,6 +90,9 @@ Given ~/Projects/FOSS/emacs/lisp/comint.el
|
||||||
relative-to-project => lisp/comint.el
|
relative-to-project => lisp/comint.el
|
||||||
file-name => comint.el")
|
file-name => comint.el")
|
||||||
|
|
||||||
|
(defvar doom-modeline-python-executable "python"
|
||||||
|
"What executable for python will be used (if nil nothing will be shown)")
|
||||||
|
|
||||||
;; externs
|
;; externs
|
||||||
(defvar anzu--current-position)
|
(defvar anzu--current-position)
|
||||||
(defvar anzu--overflow-p)
|
(defvar anzu--overflow-p)
|
||||||
|
@ -1091,8 +1094,8 @@ See `mode-line-percent-position'.")
|
||||||
;; Versions, support Python, Ruby and Golang
|
;; Versions, support Python, Ruby and Golang
|
||||||
(add-hook 'python-mode-hook
|
(add-hook 'python-mode-hook
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(when (and (executable-find "python") (executable-find "cut") (executable-find "sed"))
|
(when (and (executable-find doom-modeline-python-executable) (executable-find "cut") (executable-find "sed"))
|
||||||
(setq doom-modeline-env-command "python --version 2>&1 | cut -d' ' -f2 | sed -n '1p'"))))
|
(setq doom-modeline-env-command (concat doom-modeline-python-executable " --version 2>&1 | cut -d' ' -f2 | sed -n '1p'")))))
|
||||||
(add-hook 'ruby-mode-hook
|
(add-hook 'ruby-mode-hook
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(when (and (executable-find "ruby") (executable-find "cut") (executable-find "sed"))
|
(when (and (executable-find "ruby") (executable-find "cut") (executable-find "sed"))
|
||||||
|
|
Loading…
Reference in a new issue