-
Notifications
You must be signed in to change notification settings - Fork 219
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
Moving a window while cycling through spaces #124
Comments
I assume what you mean is that you would use one bind to select a window, and then press some other bind to actually perform the move operation? If that is the case the only option I can think of right now would be to write the window id to some file |
@koekeishiya Thanks for the suggestion. I managed to get the following working: Extract and store the currently focused window with: Move window to focused space, and focus window: 🎉 |
You can also use pbcopy and pbpaste instead of the temp file I suppose. *echo “whatever” | pbcopy* and *pbpaste* to retrieve it. This clobbers your clipboard, but I think it is possible to set which pasteboard to use in case that is a problem.
… On 27 Apr 2020, at 22:00, Max Jowett ***@***.***> wrote:
@koekeishiya <https://github.com/koekeishiya> Thanks for the suggestion. I managed to get the following working:
Extract and store the currently focused window with:
echo $(yabai -m query --windows --window | jq -r '.id') > /tmp/window-id
Move window to focused space, and focus window:
yabai -m window $(cat /tmp/window-id) --space $(yabai -m query --spaces --space | jq -r ' .index') \ && yabai -m window --focus $(cat /tmp/window-id)
🎉
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#124 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABPDZV3IXI6B2DBU4RZLV43ROXP5LANCNFSM4MPZV46A>.
|
First, I'd like to say I am really enjoying yabai. I've spent some time tweaking my config and have found myself looking for a solution to move windows without explicitly stating which space first.
For example - I'm currently using the following to loop through spaces with
alt + space
:alt - space : yabai -m space --focus "$(yabai -m query --spaces --display \ 0 | jq 'reverse | nth(index(map(select(.focused == 1))) - 1).index')"
Is it possible to select a window, cycle through spaces, and drop it in the active space? This pattern would almost resemble a drag and drop, better yet, select and drop.
Using jq, I'm able to query for the active window id, as far as I know I can't set variables in my skhdrc. Is it possible to store this value somehow? If I could get over this hump I feel like the rest would come together fairly easily.
If I can clarify anything please let me know. It could be that this is simply not possible.
The text was updated successfully, but these errors were encountered: