I know there is a ton of questions and answers about this topic, but none answers my question sufficiently.
Let's say I have a viewport view that I want to render in Cycles. Pressing ALT CTRL Numpad 0 aligns the camera to this view, but it does not solve the whole problem. The thing is, I want PRECISELY this view on the render, preferably in one click, without manually moving the camera back-and-forth, changing sensor sizes etc. fiddling that will remove the unwanted border that appears and blocks the viewport partially. This whole activity wastes a lot of precious time especially if you do this 10 times a day.
What this dream action should do:
match the render resolution (proportions) to the resolution of the current view (can the resolution of current view be read by a Python script?)
make the entire view the camera view, without any borders, passe-partout etc. by automatically maneuvering sensor sizes etc. whatever is necessary to make it exactly the same view, the same camera lens angle.
Is it possible to write such a script that would do it all in one click?