Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

Commit

Permalink
[wm] Return both filters and actions when fetching a rule
Browse files Browse the repository at this point in the history
  • Loading branch information
david committed Apr 9, 2023
1 parent 7ad8250 commit 3365d9b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions edie-wm.el
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ Return nil or the list of windows that match the filters."
(or (not above) (edie-wm-above-p window above t))
(or (not below) (edie-wm-below-p window below t))
(or (not can-focus)
(not (map-elt (edie-wm-window-find-rule window) 'skip-focus-list))))))
(not (map-elt (cdr (edie-wm-window-find-rule window)) 'skip-focus-list))))))

(defun edie-wm-update-window (window alist)
""
Expand Down Expand Up @@ -811,7 +811,7 @@ Return nil or the list of windows that match the filters."
(declare (edie-log t))
(when-let ((window (edie-wm-current-window)))
(let* ((new-props nil)
(rules (edie-wm-window-find-rule window))
(rules (cdr (edie-wm-window-find-rule window)))
result)
(dolist (fun edie-wm-window-rules-functions)
(setq result (funcall fun rules window))
Expand All @@ -822,9 +822,9 @@ Return nil or the list of windows that match the filters."
(edie-wm-update-window window new-props)))))

(defun edie-wm-window-find-rule (window)
(cdr (seq-find (pcase-lambda (`(,filter . ,_))
(edie-wm-window-filter-match-p filter window))
edie-wm-rules-alist)) )
(seq-find (pcase-lambda (`(,filter . ,_))
(edie-wm-window-filter-match-p filter window))
edie-wm-rules-alist) )

(defun edie-wm-tile--gen-commands (tiles)
(dolist (tile tiles)
Expand Down

0 comments on commit 3365d9b

Please sign in to comment.