How to make a snap window take left over space on screen with respect to other window.

I am looking for 2 things

  1. lets say I have 2 windows A and B , I resize A manually, Is there a way I can snap B to take whatever remaining size is there on the screen ?
  2. Lets say I have 2 windows A and B , A taking 1/3 of screen and B taking 2/3 of screen. Is it possible that when I manually resize A to take 1/2 screen , B automatically adjusts to take other half (I.e automatically go from 2/3 to 1/2 of screen) ?
    Like when I increase 1 window size the other decreases and vice - versa.

The automatic resizing feature is very similar to when we select "Tile window to left of screen" option natively available in Mac ,
I am basically trying to do

BetterTouchTool can not do this. Possibly some dedicated window manager like Yabai can help GitHub - koekeishiya/yabai: A tiling window manager for macOS based on binary space partitioning

What probably comes closest to what you want is to automate the window positions with a macro. So you can switch between different window positions with a trigger, but not manually.