diff options
-rw-r--r-- | init.el | 20 | ||||
-rw-r--r-- | lisp/acdw-modeline.el | 5 |
2 files changed, 25 insertions, 0 deletions
diff --git a/init.el b/init.el index 4e11921..9f5fd13 100644 --- a/init.el +++ b/init.el | |||
@@ -950,6 +950,7 @@ if ripgrep is installed, otherwise `consult-grep'." | |||
950 | simple-modeline-segment-position | 950 | simple-modeline-segment-position |
951 | simple-modeline-segment-word-count) | 951 | simple-modeline-segment-word-count) |
952 | (simple-modeline-segment-misc-info | 952 | (simple-modeline-segment-misc-info |
953 | acdw-modeline/winum | ||
953 | acdw-modeline/text-scale | 954 | acdw-modeline/text-scale |
954 | simple-modeline-segment-process | 955 | simple-modeline-segment-process |
955 | acdw-modeline/god-mode-indicator | 956 | acdw-modeline/god-mode-indicator |
@@ -1011,6 +1012,25 @@ if ripgrep is installed, otherwise `consult-grep'." | |||
1011 | (which-key-setup-minibuffer) | 1012 | (which-key-setup-minibuffer) |
1012 | (which-key-mode +1)) | 1013 | (which-key-mode +1)) |
1013 | 1014 | ||
1015 | (setup (:straight winum) | ||
1016 | (:option winum-auto-setup-mode-line nil | ||
1017 | winum-ignored-buffers '(" *which-key*")) | ||
1018 | |||
1019 | (when (display-graphic-p) | ||
1020 | (:with-map winum-keymap | ||
1021 | (:bind "M-0" winum-select-window-0-or-10 | ||
1022 | "M-1" winum-select-window-1 | ||
1023 | "M-2" winum-select-window-2 | ||
1024 | "M-3" winum-select-window-3 | ||
1025 | "M-4" winum-select-window-4 | ||
1026 | "M-5" winum-select-window-5 | ||
1027 | "M-6" winum-select-window-6 | ||
1028 | "M-7" winum-select-window-7 | ||
1029 | "M-8" winum-select-window-8 | ||
1030 | "M-9" winum-select-window-9))) | ||
1031 | |||
1032 | (winum-mode +1)) | ||
1033 | |||
1014 | (setup (:straight zzz-to-char) | 1034 | (setup (:straight zzz-to-char) |
1015 | (defun acdw/zzz-up-to-char (prefix) | 1035 | (defun acdw/zzz-up-to-char (prefix) |
1016 | "Call `zzz-up-to-char', unless issued a PREFIX, in which case | 1036 | "Call `zzz-up-to-char', unless issued a PREFIX, in which case |
diff --git a/lisp/acdw-modeline.el b/lisp/acdw-modeline.el index 7eca143..81b808d 100644 --- a/lisp/acdw-modeline.el +++ b/lisp/acdw-modeline.el | |||
@@ -88,4 +88,9 @@ indicator in the mode-line." | |||
88 | (if-let ((backend (vc-backend buffer-file-name))) | 88 | (if-let ((backend (vc-backend buffer-file-name))) |
89 | (substring vc-mode (+ (if (eq backend 'Hg) 2 3) 2)))) | 89 | (substring vc-mode (+ (if (eq backend 'Hg) 2 3) 2)))) |
90 | 90 | ||
91 | (defun acdw-modeline/winum () | ||
92 | (when (and (bound-and-true-p winum-mode) | ||
93 | (> winum--window-count 1)) | ||
94 | (format winum-format (winum-get-number-string)))) | ||
95 | |||
91 | (provide 'acdw-modeline) | 96 | (provide 'acdw-modeline) |