[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/swsw 63e295f599 025/146: Add a user option to customize th
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/swsw 63e295f599 025/146: Add a user option to customize the scope of window tracking |
Date: |
Wed, 25 May 2022 02:59:40 -0400 (EDT) |
branch: elpa/swsw
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."
- [nongnu] elpa/swsw cacd11a1b7 072/146: Prevent setting 'swsw-minibuffer-id' to a member of 'swsw-id-chars', (continued)
- [nongnu] elpa/swsw cacd11a1b7 072/146: Prevent setting 'swsw-minibuffer-id' to a member of 'swsw-id-chars', ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw dd65e7c8af 139/146: ; Update copyright years, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw ac8efcbbd1 007/146: Assign a unique ID to an active minibuffer, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 08b56d124c 015/146: Add support for multi-character IDs, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 185861a2e9 010/146: Use a lighter for 'swsw-mode', ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 6a9b3544c9 002/146: ; Fix 'git clone' example command in README file, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 15e188aa17 009/146: Fix some edge cases related to the minibuffer, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 0aef3311c6 014/146: ; Bump to version 0.3, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 9873ff1bd2 020/146: * swsw.el (swsw-select): Add before and after hooks., ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 4a7ea31b37 036/146: * swsw.el (swsw-mode): Bind 'C-x o' to 'swsw-select', ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 63e295f599 025/146: Add a user option to customize the scope of window tracking,
ELPA Syncer <=
- [nongnu] elpa/swsw 721d0208f7 026/146: Update the window list after deleting a frame, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 48db8fe39b 021/146: Add a reference implementation for a conditional display function, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 4c84ca310f 016/146: ; Update README to reflect recent changes, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw a816f208e9 005/146: Simplify the format of 'swsw-window-list', ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw f9a901c809 004/146: * swsw.el (swsw-id-chars-base): Remove erroneous quote, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 96809a6cae 019/146: Add the ability to change the way window IDs are displayed, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw c08a9b1e58 024/146: ; Fix a docstring, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw b6277eb31f 037/146: ; Indicate that version 1.1 is still in development in the NEWS file, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw a5b25e075f 032/146: Allow setting the scope to the selected frame, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 082e03382e 033/146: * swsw.el (swsw-select): Ensure 'swsw-after-select-hook' runs., ELPA Syncer, 2022/05/25