[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/nano-modeline 5bd92ffe88 3/5: Added custom makers for d
|
From: |
ELPA Syncer |
|
Subject: |
[elpa] externals/nano-modeline 5bd92ffe88 3/5: Added custom makers for dedicated component |
|
Date: |
Wed, 10 Jan 2024 10:43:50 -0500 (EST) |
branch: externals/nano-modeline
commit 5bd92ffe888af67b6f1afcc18411aaef36a875fb
Author: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>
Commit: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>
Added custom makers for dedicated component
---
nano-modeline.el | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/nano-modeline.el b/nano-modeline.el
index 4b96cde69b..f3a74af140 100644
--- a/nano-modeline.el
+++ b/nano-modeline.el
@@ -143,6 +143,12 @@
(const :tag "Bottom" nano-modeline-footer))
:group 'nano-modeline)
+(defcustom nano-modeline-window-dedicated-symbol '("[D] " . "[•] ")
+ "Pairs of strings showing a window is dedicated or not dedicated"
+ :type '(cons (string :tag "Window is dedicated" )
+ (string :tag "Window is not dedicated"))
+ :group 'nano-modeline)
+
(defface nano-modeline-active
`((t (:foreground ,(face-foreground 'default)
:background ,(face-background 'header-line nil t)
@@ -547,10 +553,12 @@ delay needs to be set to 0."
(format-mode-line "(%l lines)")
'face (nano-modeline-face 'primary))))
-(defun nano-modeline-window-dedicated (&optional symbol)
+(defun nano-modeline-window-dedicated (&optional dedicated not-dedicated)
"Pin symbol when window is dedicated"
- (propertize (if (window-dedicated-p) (or symbol " ") "")
+ (propertize (if (window-dedicated-p)
+ (or dedicated (car nano-modeline-window-dedicated-symbol))
+ (or not-dedicated (cdr nano-modeline-window-dedicated-symbol)))
'face (nano-modeline-face 'secondary)))
(defun nano-modeline-git-info (&optional symbol)