[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/workroom 497c04d666 15/74: Make lighter customizable
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/workroom 497c04d666 15/74: Make lighter customizable |
Date: |
Sun, 27 Nov 2022 16:03:18 -0500 (EST) |
branch: elpa/workroom
commit 497c04d666c28662b359d6a6e4a9f0f9e20531e2
Author: Akib Azmain Turja <akib@disroot.org>
Commit: Akib Azmain Turja <akib@disroot.org>
Make lighter customizable
---
workroom.el | 40 ++++++++++++++++++++++------------------
1 file changed, 22 insertions(+), 18 deletions(-)
diff --git a/workroom.el b/workroom.el
index b8fdcd1d4b..4e045f50f5 100644
--- a/workroom.el
+++ b/workroom.el
@@ -123,6 +123,27 @@ can't restored."
(const :decoder)
(function :tag "Decoder function"))))
+(defcustom workroom-mode-lighter
+ '(" WR["
+ (:eval (propertize (workroom-name (workroom-current-room)) 'face
+ (if (member (current-buffer)
+ (workroom-buffer-list
+ (workroom-current-room)))
+ 'compilation-info
+ 'warning)))
+ "]["
+ (:eval (propertize (workroom-view-name (workroom-current-view)) 'face
+ (if (member (current-buffer)
+ (workroom-buffer-list
+ (workroom-current-room)))
+ 'compilation-info
+ 'warning)))
+ "]")
+ "Format of Workroom mode lighter.
+
+The value is a mode line terminal like `mode-line-format'."
+ :type 'sexp)
+
(cl-defstruct workroom
"Structure for workroom."
(name nil
@@ -134,8 +155,6 @@ can't restored."
(buffers nil
:documentation "Buffers of the workroom.")
(default-p nil
-
- ;; Why this line is indented like this?
:documentation "Whether the workroom is the default one.")
(previous-view-list nil
:documentation "List of previously selected views.")
@@ -920,22 +939,7 @@ When prefix arg is given, don't restrict." fn)
;;;###autoload
(define-minor-mode workroom-mode
"Toggle workroom mode."
- :lighter (" WR["
- (:eval (propertize (workroom-name (workroom-current-room))
- 'face (if (member
- (current-buffer)
- (workroom-buffer-list
- (workroom-current-room)))
- 'compilation-info
- 'warning)))
- "]["
- (:eval (propertize (workroom-view-name (workroom-current-view))
- 'face (if (member
- (current-buffer)
- (workroom-buffer-list
- (workroom-current-room)))
- 'compilation-info
- 'warning))) "]")
+ :lighter (:eval workroom-mode-lighter) ; TODO: Why the `:eval' is needed?
:global t
(substitute-key-definition 'workroom-command-map nil workroom-mode-map)
(define-key workroom-mode-map workroom-command-map-prefix
- [nongnu] elpa/workroom e7dc14236e 42/74: Fix out of sync documentation, (continued)
- [nongnu] elpa/workroom e7dc14236e 42/74: Fix out of sync documentation, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 3144324e33 39/74: Add an user manual, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 40acb8c7b8 45/74: O(n) switch-to-buffer instead of O(n^2) in project workrooms, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 13e648f3db 74/74: Add .dir-locals.el, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom add6fb080d 61/74: Bump version to 2.1.1, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 9974fb58a9 41/74: Add new command workroom-bookmark-multiple, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom a87110f435 56/74: Clone views correctly, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom f9d88f211c 68/74: Bump version to 2.2.2, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom eef13afbbf 66/74: Bump version to 2.2.1, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 1d4c134d60 26/74: Add new command workroom-switch-room, some refactoring, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 497c04d666 15/74: Make lighter customizable,
ELPA Syncer <=
- [nongnu] elpa/workroom b28aae7a13 40/74: Add chapter "Project Integration" to manual, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 98d1158ef0 36/74: Fix key binding of "C-d" in command map, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 8e805c716e 51/74: Bump version to 2.0.2, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 64da63c1a9 67/74: Add Compat dependency, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom bb74cce814 60/74: Fix error when a frame is killed, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 1a0dd6b17d 65/74: Use format-prompt to format minibuffer prompts, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom fe38dc8aea 63/74: Bump version to 2.2, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom a82287cd5b 06/74: Add support for dynamic buffer list, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom c38489669e 18/74: Fix the defaults of workroom-switch, ELPA Syncer, 2022/11/27
- [nongnu] elpa/workroom 78f0d5ee9e 38/74: Accept prefix argument in workroom-kill-with-buffers, ELPA Syncer, 2022/11/27