mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-24 03:00:10 +00:00
Support winum-mode.
This commit is contained in:
parent
4ef93c7aab
commit
28000c45f4
1 changed files with 18 additions and 7 deletions
|
@ -49,6 +49,7 @@
|
||||||
(require 'projectile)
|
(require 'projectile)
|
||||||
(require 'shrink-path)
|
(require 'shrink-path)
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; Variables
|
;; Variables
|
||||||
;;
|
;;
|
||||||
|
@ -90,6 +91,9 @@ Given ~/Projects/FOSS/emacs/lisp/comint.el
|
||||||
(defvar iedit-mode)
|
(defvar iedit-mode)
|
||||||
(defvar iedit-occurrences-overlays)
|
(defvar iedit-occurrences-overlays)
|
||||||
(defvar text-scale-mode-amount)
|
(defvar text-scale-mode-amount)
|
||||||
|
(defvar winum-auto-setup-mode-line)
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; Custom faces
|
;; Custom faces
|
||||||
;;
|
;;
|
||||||
|
@ -890,13 +894,20 @@ Returns \"\" to not break --no-window-system."
|
||||||
(advice-add #'window-numbering-clear-mode-line :override #'ignore)
|
(advice-add #'window-numbering-clear-mode-line :override #'ignore)
|
||||||
|
|
||||||
(doom-modeline-def-segment window-number
|
(doom-modeline-def-segment window-number
|
||||||
(if (and (bound-and-true-p window-numbering-mode)
|
(setq winum-auto-setup-mode-line nil)
|
||||||
|
(let ((num (cond
|
||||||
|
((bound-and-true-p winum-mode)
|
||||||
|
(winum-get-number-string))
|
||||||
|
((bound-and-true-p window-numbering-mode)
|
||||||
|
(window-numbering-get-number-string))
|
||||||
|
(t ""))))
|
||||||
|
(if (and (< 0 (length num))
|
||||||
(< 2 (length (window-list nil 'ignore))))
|
(< 2 (length (window-list nil 'ignore))))
|
||||||
(propertize (format " %s " (window-numbering-get-number-string))
|
(propertize (format " %s " num)
|
||||||
'face (if (doom-modeline--active)
|
'face (if (doom-modeline--active)
|
||||||
'doom-modeline-bar
|
'doom-modeline-bar
|
||||||
'doom-modeline-inactive-bar))
|
'doom-modeline-inactive-bar))
|
||||||
""))
|
"")))
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; workspace-number
|
;; workspace-number
|
||||||
|
|
Loading…
Reference in a new issue