I'm not sure how viable this is, but I switching between different screen sizes due to "hot desking", so being able to set geometry as percentage of screen would be very handy. For instance,
Laptop : 1920x1200
Attached Monitor : 2560x1440
if (get_application_name() == "Pixel 6") then
--x, y, width, height = get_window_geometry();
--print(x..", "..y..", "..width..", "..height);
set_window_geometry(1920, 0, 630, 1440);
set_window_workspace(8);
end
sets my scrcpy window for maximum height and width for my pixel 6 screen at the left edge position on second monitor (arranged right of laptop, see below)

but if I'm attached to a 4k monitor, this position will be wrong. Being able to set geometry as a percentage (possibly with some calculation based on preset monitor resolutions) would be very handy and will make auto scaling base don attached monitor much nicer.
I'm not sure how viable this is, but I switching between different screen sizes due to "hot desking", so being able to set geometry as percentage of screen would be very handy. For instance,
Laptop : 1920x1200
Attached Monitor : 2560x1440
sets my scrcpy window for maximum height and width for my pixel 6 screen at the left edge position on second monitor (arranged right of laptop, see below)

but if I'm attached to a 4k monitor, this position will be wrong. Being able to set geometry as a percentage (possibly with some calculation based on preset monitor resolutions) would be very handy and will make auto scaling base don attached monitor much nicer.