koekeishiya / yabai

A tiling window manager for macOS based on binary space partitioning
MIT License
24.18k stars 646 forks source link

"current" as selection value #2395

Open jbriales opened 3 months ago

jbriales commented 3 months ago

Currently there is e.g. "recent" but no explicit "current" option as a selection value referring to the currently active window/space/display.

For some commands, like yabai -m query if there is no selection specified it will default to the current one. For other commands though, this won't work. E.g. if I wanted to move a window to the current space sth like yabai -m window WIN_SELECTION --space won't work (no space specified).

I'd propose adding a new possible value recent within WINDOW_SEL/DISPLAY_SEL/SPACE_SEL (and potentially also an alias . for convenience), so that commands like these would be possible:

yabai -m query --windows --window current
yabai -m window 1234 --space current
...

This would have some extra benefits like:

Thoughts?

Bellavene commented 2 months ago

This is "current" yabai -m query --windows --window But as for window selection by account, agreed, would be preferable for scripting. That Golden sections logic doesn't work mostly, especially for scripts.