You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
It's not difficult to do that kind of thing with the existing Lua functions if you use get_monitor_geometry, set_window_position (with a monitor number) and set_window_size instead of set_window_geometry.
More calculation may be needed, of course, depending on exactly how you want to position the window; but, in this case, the following should do:
functionset_window_geometry_percent(x,y,w,h,m)
local_,_,W,H=get_monitor_geometry(m)
if_==nilthen-- monitor not foundifm~=1thenset_window_geometry_percent(x,y,w,h,1) endelseset_window_position(x*W, y*H, m)
set_window_size(w*W, h*H)
endendifget_application_name() =="Pixel 6" then-- assumption: the monitor is 16:9set_window_geometry_percent(0, 0, 630/2560, 1, 2);
set_window_workspace(8);
end
thank you for all the information. unfortunately I'm on 0.43 so this is not available to me and Debian seems unlikely to upgrade anytime soon. I'll have to look at rolling my own package or PPA, but thank you for the response and information :)
You should file a bug report there about the package being out of date – but note that it's handled by their QA team, so yes, nothing much will probably happen. It's probably going to take somebody building it (starting from the existing Debian packaging) and getting a Debian dev to sponsor it for upload to unstable…
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.
The text was updated successfully, but these errors were encountered: