Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move window in stack #2396

Open
jbriales opened this issue Aug 18, 2024 · 1 comment
Open

Move window in stack #2396

jbriales opened this issue Aug 18, 2024 · 1 comment

Comments

@jbriales
Copy link

I have some skhd bindings to move a window within a stack.
Technically this can be done e.g. with
yabai -m window --swap stack.prev
BUT this will change focus to the other window, losing focus from the current one.

A fix/workaround is to do like this:
yabai -m window --swap stack.prev; yabai -m window --focus stack.prev

However this results in some visual flicker effect since the other window is focused for a brief moment.

Other things I tried:

...

yabai -m window --swap stack.prev --focus stack.prev
This does not work

Specify to focus the initial window in the same command:

yabai -m window --swap stack.prev --focus $(yabai -m query --windows id --window | jq -r .id)
This has a shorter flicker but still has it.

Q:

Is there some alternative I'm missing?
Otherwise, would it make sense for the --swap command to keep focus on the currently selected window? Or at least make the behavior on which window to focus after the swap an option?

@Bellavene
Copy link

Agreed. It makes more sense to leave the focus on the window you are stacking currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants