I think I've accidentally triggered it a couple years ago (no window management at that time) where one of my windows stayed "shrunken" after exiting Expose. It got me thinking it would be pretty nifty for apps with bloated UI or when using as a reference. That's what I thought the Picture in Picture mode would do at first.
In theory, yes. See #148 for related information on how this could be achieved.
You need to look at it from three angles:
Implemented a basic picture-in-picture mode on master that uses visual scaling instead of actually resizing the window: yabai -m window --toggle pip
I found myself using it in combination with other commands, making the following bind:
# toggle sticky(+float), topmost, border and picture-in-picture
alt - p : yabai -m window --toggle sticky;\
yabai -m window --toggle topmost;\
yabai -m window --toggle border;\
yabai -m window --toggle pip
@koekeishiya @dominiklohmann Sorry for mentioning you in an old ticket and the very basic question: how is PIP supposed to look/work?
yabai -m window --toggle sticky;
yabai -m window --toggle topmost;
yabai -m window --toggle pip
Nothing In the error logs, in the debug ones simply:
EVENT_HANDLER_DAEMON_MESSAGE: window --toggle sticky
EVENT_HANDLER_DAEMON_MESSAGE: window --toggle topmost
EVENT_HANDLER_DAEMON_MESSAGE: window --toggle pip
The functionality I get is the same as a regular sticky + topmost. When the now floating window is resized, its content gets scaled regularly. Am I missing anything?
Before:

After:

Gotcha, thanks for confirming! 馃憤Is the PIP window manually resizable?
But yeah, here the window goes in float+sticky+topmost but it doesn't get scaled. I even restarted my MacBook and setup the accessibility permissions again, just in case. Is there any other way to troubleshoot this? Logs look fine here!
I don't think resizing a window works properly after the transformation has been applied. You can move it around just fine though.
This functionality relies on the scripting-addition to work, so if this does not work for any window on your machine (e.g Safari works just fine for me), you could try to reinstall the scripting addition and see if that helps.
I've been meaning to add proper exit codes for issues with the scripting addition (#181), but haven't gotten there yet.
@koekeishiya I finally had some time to play with this: I can confirm reinstalling the scripting addition gave me the PIP mode, thanks!
Most helpful comment
Implemented a basic picture-in-picture mode on master that uses visual scaling instead of actually resizing the window:
yabai -m window --toggle pipI found myself using it in combination with other commands, making the following bind: