Excluding hidden windows with --match
#7886
-
|
I am trying to match all visible windows in the active tab with After looking at the documentation of both kittens, and also the discussion #5834, I think this window matcher should do the trick:
For example, running the following command: executes the kitty-match.webmRunning it as a key binding: still correctly targets windows in the current tab only, but also executes the command in the window where F3 was pressed, and outputs nothing. I think I don't get what Thanks for your help 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
|
overlay_parent IIRC matches a window if it is under the self window
when the self window is an overlay. So not overlay_parent will match all
windows except the window under self if there is one.
not state:self should be working however. Try that in isolation without
overlay_parent.
I dont think there is a way to match visible windows excluding ones that
are below in an overlay stack. Would likely need a new state variable
for that, or you can always do the matching yourself by using kitten @
ls and selecting the windows based on whatever criteria you need.
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
For posterity, the following kitten @ ls \
| jq -r '
[ .[] | select(.is_focused)
| .tabs[] | select(.is_focused)
| .groups[].windows[-1]
| "id:" + (. | tostring)
] | join(" or ")
'The result can then be incorporated into the or for |
Beta Was this translation helpful? Give feedback.

For posterity, the following
jqquery returns all the visible windows as a match expression:The result can then be incorporated into the
--matchoption forsend-text:or for
broadcast(the self window is automatically excluded by the kitten, and the previously visible window must now be additionally excluded if launched in an overlay):