This question is inspired by a recent question about holomorphic bundles and factors of automorphy. Suppose $X$ is a compact, complex manifold whose universal cover $\widetilde{X}$ is Stein (the Stein condition is just to ensure all topologically trivial holomorphic vector bundles over $\widetilde{X}$ are holomorphically trivial). Then I've just recently come to appreciate the theorem that every holomorphic vector bundle (whose pullback to $\widetilde{X}$ is topologically trivial) \begin{align} E\rightarrow X \end{align} arises from a factor of automorphy, this is a holomorphic map: \begin{align} f:\pi_1(X) \times \widetilde{X}\rightarrow GL_n(\mathbb{C}) \end{align} satisfying the cocycle condition $f(\gamma\eta, x)=f(\gamma,\eta(x))f(\eta, x).$ The map $f$ defines a $\pi_1(X)$-action on the trivial bundle $\widetilde{X}\times \mathbb{C}^n\rightarrow \widetilde{X}$ and the quotient defines a holomorphic vector bundle over $X.$ Now suppose that the holomorphic structure on $E\rightarrow X$ is given as the $(0,1)$-part of a linear connection $\nabla$ on $E.$
If this connection is flat, then the factor of automorphy is nothing more than the monodromy representation $\rho:\pi_1(X)\rightarrow GL_n(\mathbb{C})$ of this flat vector bundle.
$\textbf{My question is:}$ if the connection is not flat, is there a gauge theoretic construction of the factor of automorphy defining the holomorphic structure on $E.$ Ideally this would be something involving parallel transport using the connection $\nabla,$ but in my first fumbling attempts I haven't found a way to do this.
My motivation for this question arises from something that has befuddled me for some time. I won't define everything in this section but a reference for anything I say is in Hitchin's paper "The self-duality equations on a Riemann surface." Let $X$ be a compact Riemann surface of genus at least 2. Let $\rho:\pi_1(X)\rightarrow SL_2(\mathbb{R})$ be a Fuchsian representation. Then via the non-abelian Hodge correspondence, the Higgs bundles $(E,\phi)$ corresponding to any Fuchsian representation all have the same underlying holomorphic bundle, namely \begin{align} E=K^{-\frac{1}{2}}\oplus K^{\frac{1}{2}} \end{align} where $K$ is the canonical bundle over $X.$ This has always been mysterious to me, starting from the flat bundle side; namely you form the flat bundle $E_{\rho}=\widetilde{X}\times_{\rho}\mathbb{C}^2$ and let's call the flat connection $B.$ Then by Hitchin, there exists a unique unitary connection $\nabla$ such that \begin{align} B=\nabla+\psi, \end{align} and $d_{\nabla}^{*}\psi=0.$ The holomorphic structure on $E_{\rho}$ in the Higgs bundle picture is then the one induced by the $(0,1)$-part of the unitary connection $\nabla,$ which is not the same as the one induced by the flat connection $B$ on $E_{\rho}.$ But, why should this always be $K^{-\frac{1}{2}}\oplus K^{\frac{1}{2}}.$ I've never reached a satisfying answer to this issue. I wonder if some insight into the question I asked above could clarify this situation.
Thank you for any help.