New command: doom/other-popup #141
Like other-window, but for doom popups. Also bound this to `C-x p` in private module.
This commit is contained in:
parent
8c3693ed47
commit
99b6274b03
2 changed files with 19 additions and 0 deletions
|
@ -189,3 +189,19 @@ only close popups that have an :autoclose property in their rule (see
|
|||
collect `(set! :popup ,@rule))
|
||||
,@body
|
||||
(setq shackle-rules old-shackle-rules)))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom/other-popup (count)
|
||||
"Cycle through popup windows. Like `other-window', but for popups."
|
||||
(interactive "p")
|
||||
(if-let (popups (if (doom-popup-p)
|
||||
(cdr (memq (selected-window) doom-popup-windows))
|
||||
(setq doom-popup-other-window (selected-window))
|
||||
doom-popup-windows))
|
||||
(select-window (nth (mod (1- count) (length popups)) popups))
|
||||
(unless (eq (selected-window) doom-popup-other-window)
|
||||
(when doom-popup-other-window
|
||||
(select-window doom-popup-other-window t)
|
||||
(cl-decf count))
|
||||
(when (/= count 0)
|
||||
(other-window count)))))
|
||||
|
|
|
@ -66,6 +66,9 @@
|
|||
:m "A-j" #'+hlissner:multi-next-line
|
||||
:m "A-k" #'+hlissner:multi-previous-line
|
||||
|
||||
(:prefix "C-x"
|
||||
"p" #'doom/other-popup)
|
||||
|
||||
|
||||
;; --- <leader> -------------------------------------
|
||||
(:leader
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue