about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-05-19 12:38:23 -0500
committerCase Duckworth2021-05-19 12:38:51 -0500
commit9c6be2e953c66bbda406854797d672976877603e (patch)
tree0e49251505dcb08654fcb37263cad1e874502b56
parentAdd variable-pitch-mode in Org and Info (diff)
downloademacs-9c6be2e953c66bbda406854797d672976877603e.tar.gz
emacs-9c6be2e953c66bbda406854797d672976877603e.zip
Setup winum keys after frame is setup
I should probably change this to `after-make-frame-functions' instead...
-rw-r--r--init.el32
1 files changed, 19 insertions, 13 deletions
diff --git a/init.el b/init.el index a6e29a4..31413a4 100644 --- a/init.el +++ b/init.el
@@ -1072,21 +1072,27 @@ if ripgrep is installed, otherwise `consult-grep'."
1072 (global-whitespace-cleanup-mode +1)) 1072 (global-whitespace-cleanup-mode +1))
1073 1073
1074(setup (:straight winum) 1074(setup (:straight winum)
1075 (:option winum-auto-setup-mode-line nil 1075 (:option winum-scope 'frame-local
1076 winum-auto-setup-mode-line nil
1076 winum-ignored-buffers '(" *which-key*")) 1077 winum-ignored-buffers '(" *which-key*"))
1077 1078
1078 (when (display-graphic-p) 1079 (when-unfocused winum-map-keys
1079 (:with-map winum-keymap 1080 (defvar winum--keys-mapped nil
1080 (:bind "M-0" winum-select-window-0-or-10 1081 "Whether `winum' keys have been mapped already.")
1081 "M-1" winum-select-window-1 1082 (when (and (not winum--keys-mapped)
1082 "M-2" winum-select-window-2 1083 (display-graphic-p))
1083 "M-3" winum-select-window-3 1084 (:with-map winum-keymap
1084 "M-4" winum-select-window-4 1085 (:bind "M-0" winum-select-window-0-or-10
1085 "M-5" winum-select-window-5 1086 "M-1" winum-select-window-1
1086 "M-6" winum-select-window-6 1087 "M-2" winum-select-window-2
1087 "M-7" winum-select-window-7 1088 "M-3" winum-select-window-3
1088 "M-8" winum-select-window-8 1089 "M-4" winum-select-window-4
1089 "M-9" winum-select-window-9))) 1090 "M-5" winum-select-window-5
1091 "M-6" winum-select-window-6
1092 "M-7" winum-select-window-7
1093 "M-8" winum-select-window-8
1094 "M-9" winum-select-window-9))
1095 (setq winum--keys-mapped t)))
1090 1096
1091 (winum-mode +1)) 1097 (winum-mode +1))
1092 1098