何とはなしに
Meanings
1
for no particular reason; somehow or other; without thinking
Expresses doing something without a clear reason or intention, often with a nuance of absent-mindedness or vague impulse.
I looked up at the sky for no particular reason.
Somehow or other, I found myself thinking about him.