asmvik / asmvik/yabai

[Feature Request] Support multiple arguments per query

Open
#2,537 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
29.6k
Forks
750
PR merge metrics
No merged PRs in 30d

Description

`yabai query --` supports three constraint arguments:
```
ARGUMENT
^^^^^^^^

*--display* ['']::
Constrain matches to the selected display.

*--space* ['']::
Constrain matches to the selected space.

*--window* ['']::
Constrain matches to the selected window.
```
But they cannot be used at the same time, only the first passed argument is accepted.

I want to apply multiple constraint, to achieve things like "get the first window at specific display":
```
yabai -m query --windows --display 3 --window first
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the `yabai query --windows` command and trace how its `--display` and `--window` arguments are parsed and applied. Confirm the existing single-constraint behavior, then verify that `yabai -m query --windows --display 3 --window first` applies both constraints and returns the first matching window on display 3.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.