Get Inspector width

I’m currently experimenting with some custom inspector controls and wondered how I could get the Inspector width. Is this possible?

As far as I know there’s only this, ugly, way.