diff --git a/README.md b/README.md index 9c70dbf..34af473 100644 --- a/README.md +++ b/README.md @@ -239,6 +239,13 @@ Run `M-x customize-group RET doom-modeline RET` or set the variables. (setq doom-modeline-env-go-executable "go") (setq doom-modeline-env-elixir-executable "iex") (setq doom-modeline-env-rust-executable "rustc") + +;; What to dispaly as the version while a new one is being loaded +(setq doom-modeline-env-load-string "...") + +;; Hooks that run before/after the modeline version string is updated +(setq doom-modeline-before-update-env-hook nil) +(setq doom-modeline-after-update-env-hook nil) ``` ## FAQ diff --git a/doom-modeline-env.el b/doom-modeline-env.el index 453c193..1cdc9b4 100644 --- a/doom-modeline-env.el +++ b/doom-modeline-env.el @@ -38,7 +38,8 @@ "The environment parser for doom-modeline." :group 'doom-modeline) -(defcustom doom-modeline-env-python-executable "python" +(defcustom doom-modeline-env-python-executable + (or (bound-and-true-p python-shell-interpreter) "python") "The executable to parse Python version." :type 'string :group 'doom-modeline-env) @@ -73,13 +74,13 @@ :type 'string :group 'doom-modeline-env) -(defcustom doom-modeline-after-update-env-hook nil - "Hooks that run after the modeline version string is updated." +(defcustom doom-modeline-before-update-env-hook nil + "Hooks that run before the modeline version string is updated." :type 'hook :group 'doom-modeline-env) -(defcustom doom-modeline-before-update-env-hook nil - "Hooks that run before the modeline version string is updated." +(defcustom doom-modeline-after-update-env-hook nil + "Hooks that run after the modeline version string is updated." :type 'hook :group 'doom-modeline-env)