I didn't mean to eavesdrop, but I couldn't help overhearing you.
Literal
Eavesdrop do feeling [topic-は] didn't-exist [concessive-が], unintentionally your talk [subject-が] was-audible-regrettably.
立ち聞きする気はなかった (had no intention to eavesdrop) uses 気 (intention/feeling). つい (unintentionally) + 聞こえてしまった (ended up hearing) — 聞こえる is the intransitive 'to be audible,' not the active 'to listen,' emphasizing that hearing was involuntary.