You can’t do バカだった気がつく… 気がつく means “to realize” You don’t realize yourself in the past tense - you’re realizing 気がつく the fact こと “being and idiot” バカだって、バカだという
This is a bit exhausting to type on my phone, I’ll get back to this when i’m home from work.
Yes, I wanted to modify the 気 with a relative clause because you can’t use だ in there it’s in the past. Seems less smart once you think about it I’m not so good with colloquial contractions …
This is side-stepping what is actually contracted, Aと気づく doesn’t work, to realize something is Aに気づく, so we need a Aというに気づく, に requires a noun clause, and so we reach @omukai’s answer Aということに気(が)つく. [が is optional?]
Uh I don’t really know. Goo lists 気づく as a synonym in the definition for 気がつく but maybe 気がつく can be modified in ways the other can’t since 気づく is a verb and 気がつく is an expression.
~に気がつく does appear as a construction in Tobira but I suppose that’s not the only way you can use it since I’ve seen a number of examples where it was used with other particles.
Let’s break this down
自分がバカだ the fact that someone is an idiot
って気がついてないバカほど、to the degree that they('re such an idiot that they) didn’t yet realize (they are an idiot)
ばかな者はない。such an idiotic person doesn’t exist
→ there’s no idiot like one who didn’t yet realize they are one
→ only real idiots don’t get that they’re idiots
Now for the grammar:
自分がバカだって is colloquial, and the って could be anything from だって to だということ, including half-assed constructs like だってこと (which incidentally would be how i would have phrased it).
気がついてない did not yet realize
バカ THIS here is the one noun that’s been modified by everything before
ほど、and here comes “to the degree that”
ばかな者はない。“such an idiot doesn’t exist”.
Now, this was not only colloquial, this also lacked even a minimum of eloquence, it would even make a Japanese person frown. It’s just a chaotic stream of consciousness type of sentence, no wonder OP had problems comprehending it.
If i were to phrase it, I’d do it like
自分をバカだって思ってるバカがいるわけない。
(and my だって here was actually just a slurred だと, no “invisible magic” to be found.