[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/exwm 7d967e7: Allow customizing workspace indexes
From: |
Chris Feng |
Subject: |
[elpa] externals/exwm 7d967e7: Allow customizing workspace indexes |
Date: |
Sun, 16 Jul 2017 05:09:53 -0400 (EDT) |
branch: externals/exwm
commit 7d967e73619e3628848b711f482b5db816636bda
Author: Chris Feng <address@hidden>
Commit: Chris Feng <address@hidden>
Allow customizing workspace indexes
* exwm-workspace.el (exwm-workspace-index-map): New variable for
customizing workspace indexes.
(exwm-workspace--update-switch-history): Use it.
---
exwm-workspace.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/exwm-workspace.el b/exwm-workspace.el
index 8c22b7c..bebd954 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -35,6 +35,10 @@
(defvar exwm-workspace--list nil "List of all workspaces (Emacs frames).")
(defvar exwm-workspace--current nil "Current active workspace.")
(defvar exwm-workspace-current-index 0 "Index of current active workspace.")
+(defvar exwm-workspace-index-map #'number-to-string
+ "Function for mapping a workspace index to a string for display.
+
+By default `number-to-string' is applied which yields 0 1 2 ... .")
(defsubst exwm-workspace--position (frame)
"Retrieve index of given FRAME in workspace list.
@@ -168,7 +172,7 @@ Please manually run the hook
`exwm-workspace-list-change-hook' afterwards.")
(lambda (j)
(format (if (= i j) "[%s]" " %s ")
(propertize
- (int-to-string j)
+ (apply exwm-workspace-index-map (list j))
'face
(cond ((frame-parameter (elt exwm-workspace--list j)
'exwm-urgency)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/exwm 7d967e7: Allow customizing workspace indexes,
Chris Feng <=