What is the ideal monitor rotation for programmers? xssfox investigates!
One neat thing about 45° is that it gives us pretty close to the diagonal. But not on my ultra wide. Due to maths, the amount we'd need to rotate is based on the angle of a triangle which match the aspect ration of the screen we are using. This ends up being about 22° for a 21:9 ratio.
xssfox, who settles upon 22° as the ideal orientation, includes a useful widget to generate the xrandr commands you'll need to find your own.