From 266cedffa90333c09a7e97ee429fac874fc6c14e Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Sun, 30 Sep 2018 15:16:24 +0800 Subject: [PATCH] Improve major-mode segment: add menus for major/minor modes. --- doom-modeline.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doom-modeline.el b/doom-modeline.el index 3b97cf7..bbc7a8d 100644 --- a/doom-modeline.el +++ b/doom-modeline.el @@ -635,7 +635,14 @@ directory, the file name, and its state (modified, read-only or non-existent)." (doom-modeline-def-segment major-mode "The major mode, including environment and text-scale info." (propertize - (concat (format-mode-line mode-name) + (concat (format-mode-line + `(:propertize ("" mode-name) + help-echo "Major mode\n\ +mouse-1: Display major mode menu\n\ +mouse-2: Show help for major mode\n\ +mouse-3: Toggle minor modes" + mouse-face mode-line-highlight + local-map ,mode-line-major-mode-keymap)) (when doom-modeline-env-version (format " %s" doom-modeline-env-version)) (and (boundp 'text-scale-mode-amount)