[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/window-commander 63e295f599 025/170: Add a user option
From: |
ELPA Syncer |
Subject: |
[elpa] externals/window-commander 63e295f599 025/170: Add a user option to customize the scope of window tracking |
Date: |
Wed, 28 Jun 2023 19:00:22 -0400 (EDT) |
branch: externals/window-commander
commit 63e295f599e304c96e66d1316c85a480f2cb21a1
Author: Daniel Semyonov <cmstr@dsemy.com>
Commit: Daniel Semyonov <cmstr@dsemy.com>
Add a user option to customize the scope of window tracking
* swsw.el (swsw-scope): Add user option to control the scope of window
tracking.
(swsw--get-id-length, swsw-update): Use 'swsw-scope' to determine
tracked windows.
---
swsw.el | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/swsw.el b/swsw.el
index ac73979542..421dce92c7 100644
--- a/swsw.el
+++ b/swsw.el
@@ -46,6 +46,18 @@
:group 'swsw
:type '(character))
+(defcustom swsw-scope t
+ "Scope of all window operations.
+t means consider all windows on all existing frames.
+0 (the number zero) means consider all windows on all visible and iconified
+frames.
+‘visible’ means consider all windows on all visible frames."
+ :group 'swsw
+ :type '(radio (const :tag "All windows on all frames" t)
+ (const
+ :tag "All windows on all visible and iconified frames." 0)
+ (const :tag "All windows on all visible frames" 'visible)))
+
(defun swsw--set-display-function (sym fun)
"Call the previous display function with nil as the sole argument (turning
it off), set SYM's value to FUN, and call FUN with t as the sole argument."
@@ -92,7 +104,7 @@ If set to `lighter', use the mode line lighter of
`swsw-mode'"
(defun swsw--get-id-length ()
"Return the current length of a window ID."
- (let* ((windows (length (window-list-1)))
+ (let* ((windows (length (window-list-1 nil nil swsw-scope)))
(chars (length swsw-id-chars))
(div (/ windows chars)))
;; Check the remainder to returning a longer length than necessary.
@@ -109,7 +121,7 @@ If set to `lighter', use the mode line lighter of
`swsw-mode'"
(push swsw-id-chars char-lists)
(setq acc (1+ acc)))
(apply #'swsw--get-possible-ids char-lists)))
- (walk-windows #'swsw-update-window nil t))
+ (walk-windows #'swsw-update-window nil swsw-scope))
(defun swsw-update-window (window)
"Update information for WINDOW."
- [elpa] externals/window-commander 5d1ea190ab 011/170: Only display a mode line lighter for tracked windows, (continued)
- [elpa] externals/window-commander 5d1ea190ab 011/170: Only display a mode line lighter for tracked windows, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander ba9e82c95f 001/170: initial commit, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 3f507e91c0 006/170: ; Fix docstring for 'swsw-mode', ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander ac8efcbbd1 007/170: Assign a unique ID to an active minibuffer, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 024502f51f 017/170: * swsw.el (swsw-mode): Don't call 'force-mode-line-update', ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander ddfed7b727 012/170: * swsw.el (swsw-mode): Add a sparse keymap., ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 37ad725b1e 018/170: ; Update comment referencing single character IDs, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander def4d94e43 013/170: ; Update README to better reflect the current state of the package, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 0aef3311c6 014/170: ; Bump to version 0.3, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 9873ff1bd2 020/170: * swsw.el (swsw-select): Add before and after hooks., ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 63e295f599 025/170: Add a user option to customize the scope of window tracking,
ELPA Syncer <=
- [elpa] externals/window-commander 721d0208f7 026/170: Update the window list after deleting a frame, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 082e03382e 033/170: * swsw.el (swsw-select): Ensure 'swsw-after-select-hook' runs., ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 4a7ea31b37 036/170: * swsw.el (swsw-mode): Bind 'C-x o' to 'swsw-select', ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 8044341fdb 040/170: ; Update README to no longer suggest binding 'C-x o' in 'swsw-mode-map', ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander b0b55f010c 041/170: ; Improve the docstrings for the reference display functions, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander c0f5277538 045/170: ; Update the URL property of the package, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 8fc0e7dfa7 046/170: ; Bump required emacs version to 26.1, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 40f7a25f82 047/170: ; Add license information to the title page of the Info node, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 83eb90586a 051/170: ; Alter comments and docstrings to comply with Emacs' conventions, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 08b56d124c 015/170: Add support for multi-character IDs, ELPA Syncer, 2023/06/28