This is my first post here, so I hope I didn't make any mistake or ask about something silly.
Could someone please explain to me the meaning of こうして in the following sentence?
こうして目が覚める前、夢うつつにまわりを見ていたおかげだろう。
I searched and saw that こうして is used to mean "like this" or "in this way", but also "thus" when describing the result of a previously stated matter. I understand the rest of the sentence, and I guess こうして here plays the role of "thus", but I don't really know what result it expresses and how it would translate.
For reference, the previous sentences are:
左腕には一本のチューブが刺さっている。それが点滴である事を、自分はなんとなく受け入れている。