From 165c864d46cddc07515951b16755a6768ebc6236 Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Mon, 15 Jul 2019 02:38:51 +0800 Subject: [PATCH] Update customization examples in README. --- README.md | 7 +++++++ doom-modeline-env.el | 11 ++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) 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)