koekeishiya / yabai

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

Warp behaves like swap #799

Closed sagikazarmark closed 3 years ago

sagikazarmark commented 3 years ago

Since this is my first issue here, so let my start by saying thank you for this project. It's an incredible productivity booster (at least for me).

I recently noticed that warp behaves like swap on my MacBook. I have the following skhd configuration (my yabai config is pretty much the same as the example, I added a few rules for not managing windows):

# swap window                                                                                                                                
fn + shift - h : yabai -m window --swap west
fn + shift - j : yabai -m window --swap south
fn + shift - k : yabai -m window --swap north
fn + shift - l : yabai -m window --swap east

# move window
fn + shift + alt - h : yabai -m window --warp west
fn + shift + alt - j : yabai -m window --warp south
fn + shift + alt - k : yabai -m window --warp north
fn + shift + alt - l : yabai -m window --warp east 

No matter which combination I use, when I move a window it never keeps its original size.

(I played around with the actual hotkeys to make sure that its not because of the similar hotkeys)

I know I've seen this feature working before (so I'm not really sure if it's a bug somewhere or a misconfiguration), but I can't seem to make it work now.

Yabai version: yabai-v3.3.6 SKHD version: skhd version 0.3.5 SIP: disabled

Any ideas? Thanks in advance!

sagikazarmark commented 3 years ago

A few more details: I'm no Big Sure. Configured sudo to allow nopasswd for my user. When I manually run sudo yabai --load-sa it runs just fine, but manually running this for example fails:

❯ yabai -m space --focus  6
cannot focus space due to an error with the scripting-addition.

I also found that manually warping from a terminal works just fine: yabai -m window --warp west, but it doesn't work with any hotkeys defined in skhd.

sagikazarmark commented 3 years ago

Okay, reinstalling the scripting addition fixed the above error message, but warp and swap still does exactly the same.

dominiklohmann commented 3 years ago

In some situations, warp and swap are the exact same operation. Can you create a set of screenshots or ideally a screencast showing the issue?

sagikazarmark commented 3 years ago

Thanks @dominiklohmann for getting back to me.

Here is a screencast:

https://user-images.githubusercontent.com/1226384/105160729-dff65800-5b10-11eb-911b-0e9498fa5aed.mov

I would assume that warp retains the size of the window. Am I wrong?

dominiklohmann commented 3 years ago

I would assume that warp retains the size of the window. Am I wrong?

Yes. You are fundamentally misunderstanding what warp does. Try this again with three windows open and I think you'll grok the difference between swap and warp quite quickly.

sagikazarmark commented 3 years ago

@dominiklohmann oh, I see. Sorry for the noise then. 🙂

LeonAndrade commented 10 months ago

ended up here with the same misunderstading of this functionality, thanks @dominiklohmann!