Use window-total-width; rewrite writeroom-set-margins.